I am using MySQL 5.0.
I have created a database named accounts
, but now I want to change the database name to FinanceAccounts
.
The best way is probably to rename each of the tables inside the database to the new name. For example:
Update: There are two steps here
Create a new blank database as you want say "new accounts"
CREATE DATABASE newaccounts;
Migrate each table one-by-one
RENAME TABLE accounts.tablename TO newaccounts.tablename;
See http://dev.mysql.com/doc/refman/5.0/en/rename-table.html for more information.