Paul, Do you know if there will be an ALTER DATABASE RENAME curName TO newName implementation?
I don't know. I agree it would be nice, though somewhat tricky.
One workaround is to use mysqldump to dump the database, create the new database, reload the dump file into the new database, then drop the old database. That is, in effect, a database rename, although (I suspect) it can cause problems if you have foreign key relationships that refer to the table names in the original database.
Another approach is to create the new database, and then, for each table in the original database, use RENAME TABLE orig_db.t TO new_db.t to move the table from one database to the other. Then drop the old database.
-----Original Message----- From: Victor Pendleton To: 'Paul DuBois '; Victor Pendleton; ''Chen, Jenny ' '; '''[EMAIL PROTECTED]' ' ' Sent: 4/16/04 10:55 AM Subject: RE: rename database
Oversight on my part. This will not work for those table types.
-----Original Message----- From: Paul DuBois To: Victor Pendleton; 'Chen, Jenny '; ''[EMAIL PROTECTED]' ' Sent: 4/16/04 10:43 AM Subject: RE: rename database
At 10:28 -0500 4/16/04, Victor Pendleton wrote:You can rename it at the filesystem level.
What if you have InnoDB or BDB tables?
-----Original Message----- From: Chen, Jenny To: '[EMAIL PROTECTED]' Sent: 4/16/04 10:18 AM Subject: rename database
Experts:
Is it possible to rename existing database ?
-- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
-- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]