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.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation