Safer and much less work:
since you have the luxury of stopping the server, stop it, restarting
with skip-networking and log in from a local console which should
guarantee that you are alone on the system.
RENAME TABLE
olddb.table1 TO newdb.table1,
olddb.table2 TO newdb.table2
put the whole list in here, the whole statement will be applied to the
system atomically meaning all changes logically take place at the same
time.
I have done this under 4.1 at an industrial level.. works like a charm
for any table type I tried.
- michael dykman
On Sun, Nov 22, 2009 at 3:01 AM, Rob Wultsch <wultsch@stripped> wrote:
> On Sat, Nov 21, 2009 at 2:43 PM, Robinson, Eric
> <eric.robinson@stripped>wrote:
>
>> > DB engines that have their own data dictionary (Innodb, etc) in
>> addition to
>> > what is in the .frm could easily be messed up.
>> Like I said, there are only MyISAM tables in the database, so would there
>> be any risks associated with my simple approach?
>>
>> (Also there are no stored procedures because this is MySQL 4.1.22.)
>>
>> --Eric
>>
>
> Within your specific circumstances what you suggest should be safe.
>
> --
> Rob Wultsch
> wultsch@stripped
>
--
- michael dykman
- mdykman@stripped
"May you live every day of your life."
Jonathan Swift
Larry's First Law of Language Redesign: Everyone wants the colon.