[prev in list] [next in list] [prev in thread] [next in thread]
List: mysql
Subject: mysql: Changing DB names on a production system
From: Michael Widenius <monty () monty ! pp ! sci ! fi>
Date: 1998-07-30 15:42:28
[Download RAW message or body]
>>>>> "Brendan" == Brendan Quinn <brendan@sofcom.com.au> writes:
Brendan> Hi MySQLers,
Brendan> We have databases with names containing dots. We managed to survive the
Brendan> transition to 3.21 by copying files across from our 3.20 system, but
Brendan> obviously we have to change the DB names or it will screw us up in the
Brendan> future.
Brendan> Because we have hundreds of CGIs all accessing the databases, there is
Brendan> no way we can do the change in one shot. What we'd like to be able to do
Brendan> is have both db.name and db_name active for a while, as we change the
Brendan> CGIs, then "turn off" (delete) the db.name databases.
Brendan> As Mysql databases are normal files on the disk, would it be possible to
Brendan> create a symlink (or hard link) in the data directory for a while, so
Brendan> both DBs are used simultaneously, and then get rid of the dot version
Brendan> when we're ready? Can anyone see this causing any problems?
Hard links should work without problems as long as no one updates
tables!
Have you tried to do:
replace db.name db_name db.name2 db_name2 ... -- *.cgi
This will allow you to changed 'in place' many table names instantly
to new ones !
Regards,
Monty
-----------------------------------------------------------
Send a mail to mdomo@tcx.se with
unsubscribe mysql your@subscription.address
in the body of the message to unsubscribe from this list.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic