If you were running Postgresql you could do it.
\h alter database
Command: ALTER DATABASE
Description: change a database
Syntax:
ALTER DATABASE name SET parameter { TO | = } { value | DEFAULT }
ALTER DATABASE name RESET parameter
ALTER DATABASE name RENAME TO newname
But in MySQL, the easiest way is probably to create a new database with the name you want and then use mysqldump to dump the old database and import it into the new one.