RE: [PHP-DB] Renaming a database name...
| From: | Boget, Chris | Date: | Wed, 19 Sep 2001 14:05:09 +0000 |
| Subject: | RE: [PHP-DB] Renaming a database name... | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-12576@lists.php.net to get a copy of this message | ||
> > Can I rename a database name ?
> There is no command to do so. Have you tried simply renaming
> the files and sub-directory where the database files are located?
> I've not tried that.
Simply renaming could be dangerous.
You can do this:
mysqldump old_database_name > old_database_name.txt
mysqladmin create new_database_name
cat old_database_name.txt |mysql new_database_name
mysqladmin drop old_database_name
of course, this is only going to work if you have MySQL and
have access to the mysqladmin program. :p
Chris