I'm a newbie with mysql/php. Is it possible to rename a database. I just did a google groups search and it seems you cant. Is there a way? Many thanks
bcc1234
11:34 am on Jun 13, 2003 (gmt 0)
If you can get terminal access just dump and restore the database with a new name.
jatar_k
4:16 pm on Jun 13, 2003 (gmt 0)
You could do the same in phpmyadmin as well. Dump it, drop it, recreate it.
Timotheos
5:17 pm on Jun 13, 2003 (gmt 0)
I'm just thinking. Maybe this is dumb. The database is stored in a directory of mysql. Would it work to just rename the directory or would that be a bad thing?
jatar_k
5:23 pm on Jun 13, 2003 (gmt 0)
To be honest I can't remember but I think that does work. Though it wouldn't be the first thing I would recommend might make for a nightmare if it didn't work. ;)
olwen
11:00 pm on Jun 15, 2003 (gmt 0)
I copy databases etc just by copying the directory on my test system, it seems to work
BCMG_Scott
2:09 pm on Jun 16, 2003 (gmt 0)
You can rename the directory that the datafiles are stored in, however you need to stop and re-start mysql, otherwise funky things can happen. This is why it's not an option in phpmyadmin
Scott Geiger
bonanza
2:13 pm on Jun 16, 2003 (gmt 0)
If you're going to try the directory name change, it's best to stop the database first, rename, then restart.