Re: [PHP] how to rename a database
at a mysql prompt in the database where your table resides, type the following: alter table currentname rename newname; That should take care of it. -- Dominic Fang Li wrote: Does anyone know how to rename a database in MySQL? Thanks! fang -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to rename a database
Here's a FAQ on renaming a mysql database : http://www.faqts.com/knowledge_base/view.phtml/aid/1262/fid/102 If anyone has useful words to add to it then do so. Philip Fang Li wrote: Does anyone know how to rename a database in MySQL? Thanks! fang -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to rename a database
Addressed to: "Chris Doyle" [EMAIL PROTECTED] "Fang Li" [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from "Chris Doyle" [EMAIL PROTECTED] Thu, 25 Jan 2001 09:38:55 +1000 To be completely safe: cd /var/mysql# or where ever your databases are stored. mysqladmin -p shutdown # shut down database to make sure all # tables are flushed, and closed mv OldDbName NewDbName # rename the directory safe_mysqld # restart mysqld mysql -p # Reassign the permissions REVOKE all users of the old table name GRANT all users of the new table name Prehaps you can rename the database file in mysql/bin ie. database_name.sql to new_database_name.sql and that will work? - Original Message - From: "Fang Li" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 25, 2001 7:20 AM Subject: [PHP] how to rename a database Does anyone know how to rename a database in MySQL? Thanks! Rick Widmer Internet Marketing Specialists http://www.developersdesk.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] how to rename a database
Step 1: Ask this question on the MySQL mailing list. :) (Sorry, I couldn't resist) The easiest way I can think of is to use MySQLDump to dump the schema and data, delete the original database, change the output of mysqldump to reflect the new database name and pump it back into mysql. Depending on your database size, this may or may not work. Cal http://www.calevans.com -Original Message- From: Fang Li [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 3:21 PM To: [EMAIL PROTECTED] Subject: [PHP] how to rename a database Does anyone know how to rename a database in MySQL? Thanks! fang -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to rename a database
Prehaps you can rename the database file in mysql/bin ie. database_name.sql to new_database_name.sql and that will work? ___ This email may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you have received this email in error, please contact the sender and delete all copies. Opinions, conclusions or other information expressed or contained in this email are not given or endorsed by the sender unless otherwise affirmed independently by the sender. _ - Original Message - From: "Fang Li" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 25, 2001 7:20 AM Subject: [PHP] how to rename a database Does anyone know how to rename a database in MySQL? Thanks! fang -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]