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
since mysql is installed on my pc as "development machine", all the databases are stored on my local drive under mysql directory somewhere, what about I simply rename the db name there?
Achievement provides the only real pleasure in life.
Maybe try copying the directory/files first, and see if you can access the name used for the copy? Then you won't lose any data if it doesn't work.
"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
Bookmarks