I don't think there's a simple, straightforward way to change a database name via SQL. You'd have to do a series of commands, such as:
- mysqldump to save all the data needed to rebuild it
- drop the old database
- create the new database name
- import the save data into the new database
Possibly you could instead just change the name of the directory and perhaps some files where the database is stored on the disk, but I have no idea what exactly what that would involve and whether there would be "gotchas" that would make that impractical.