From: Jeppe U. <web...@nx...> - 2008-02-27 15:07:31
|
> On 26/Feb/2008 09:55 Nick Jennings wrote .. >> Hello, I thought I checked this functionality before, but now I'm >> getting different behavior. When I create a virtual domain, and then >> rename it, it changes the apache virtual host, usernames, etc. However, >> the database name remains the old name, isn't it supposed to rename the >> database name as well? > > No .. mainly because MySQL doesn't have a command to do it (as far as I > know). > > - Jamie > I have used this approach with luck in the past (script written from memory...) Rename the files (databaseold.* to databasenew.*) Run sql script: use mysql; update columns_priv set Db = 'databasenew' where Db = 'databaseold'; update db set Db = 'databasenew' where Db = 'databaseold'; update host set Db = 'databasenew' where Db = 'databaseold'; update proc set db = 'databasenew' where db = 'databaseold'; update procs_priv set Db = 'databasenew' where Db = 'databaseold'; update columns_priv set Db = 'databasenew' where Db = 'databaseold'; flush privileges; -- Kind regards - Jeppe Uhd - NX |