At 11:10 -0800 1/30/02, JC wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>I'm kind of interested to find if there is a way to rename a database
>with something like the alter command.
>Looking in the index of the New Riders MySQL book I don't see
>anything other than renaming tables
>Looking through the Manual for version 3 Nothing shows up
>Looking at the mailing list archieve I don't see anything either
>I'm running 3.23.46-nt running on windows 2000 advanced server as a
>I'm thinking that the only way around this would be to do a mysqldump
>for that database and then creating a new database with the desired
>name and importing the contents of the dump file.
>I'd like to be able to just rename the database from the command line
>just like you would a table.
If your database doesn't contain InnoDB tables, you can try this:
- Shut down the MySQL server
- Rename the database directory
- Restart the MySQL server
But remember that if you have entries in the grant tables that pertain
specifically to that database, you'll need to update them to use the
new database name.
>Thanks in advance,