RE: Rename Database - Why Would This Not Work?
am 21.11.2009 22:43:22 von Eric.Robinson
------_=_NextPart_001_01CA6AF3.A6AD0038
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
> DB engines that have their own data dictionary (Innodb, etc) in
addition to=20
> 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?=20
=20
(Also there are no stored procedures because this is MySQL 4.1.22.)
=20
--Eric
=20
------_=_NextPart_001_01CA6AF3.A6AD0038--
Re: Rename Database - Why Would This Not Work?
am 22.11.2009 09:01:54 von Rob Wultsch
--0016364c67239da49d0478f12042
Content-Type: text/plain; charset=ISO-8859-1
On Sat, Nov 21, 2009 at 2:43 PM, Robinson, Eric 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@gmail.com
--0016364c67239da49d0478f12042--
Re: Rename Database - Why Would This Not Work?
am 22.11.2009 22:30:03 von Michael Dykman
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 wrote:
> On Sat, Nov 21, 2009 at 2:43 PM, Robinson, Eric =
wrote:
>
>> =A0> 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 ther=
e
>> 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@gmail.com
>
--=20
- michael dykman
- mdykman@gmail.com
"May you live every day of your life."
Jonathan Swift
Larry's First Law of Language Redesign: Everyone wants the colon.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg