Re: how to rename a database
| From: | php3 at developersdesk dot com | Date: | Thu, 25 Jan 2001 17:22:39 +0000 |
| Subject: | Re: how to rename a database | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-36660@lists.php.net to get a copy of this message | ||
Addressed to: "Chris Doyle" <gaur@planetveggie.com>
"Fang Li" <fli@biographix.com>
<php-general@lists.php.net>
** Reply to note from "Chris Doyle" <gaur@planetveggie.com> 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" <fli@biographix.com>
> To: <php-general@lists.php.net> 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