From: Reindl Harald Date: July 20 2012 9:00pm Subject: Re: Disable DB without deleting data List-Archive: http://lists.mysql.com/mysql/227862 Message-Id: <5009C6D0.2040709@thelounge.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigEBCD5E311B7CF24C1C2CEE2B" --------------enigEBCD5E311B7CF24C1C2CEE2B Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable http://dev.mysql.com/doc/refman/5.1/en/rename-database.html This statement was added in MySQL 5.1.7 but was found to be dangerous and was removed in MySQL 5.1.23 well, as said: dump and delete or revoke permissions Am 20.07.2012 20:16, schrieb Rick James: > No. RENAME DATABASE does not exist. It may have something to do with = internal table numbers in InnoDB. > Instead... > CREATE DATABASE new ...; > RENAME TABLE old.t1 TO new.t1, ... > DROP DATABASE old; > This should work cross-device. >=20 >> -----Original Message----- >> From: Reindl Harald [mailto:h.reindl@stripped] >> Sent: Friday, July 20, 2012 2:51 AM >> To: Johan De Meersman >> Cc: mysql@stripped >> Subject: Re: Disable DB without deleting data >> >> >> >> Am 20.07.2012 11:20, schrieb Johan De Meersman: >>> >>> ----- Original Message ----- >>>> From: "Reindl Harald" >>>> >>>> impossible with innodb >>>> >>>> * dump >>>> * delete >>>> >>>> with myisam you could stop the server and move the databasedir do >> not >>>> try this with innodb even with innodb_file_per_table! >>> >>> Mmh, it should be pretty easy to write a small script that creates a >> new database named _offline and renames all tables into it, >> no? >>> >>> Shame that "rename database" doesn't exist any more :-) >> >> my reply was to "Something like moving the databases subdirectory to a= >> different directory" >> >> surely, you can rename the database >> but if you want to move it to another mount-point you are lost with >> innodb --------------enigEBCD5E311B7CF24C1C2CEE2B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAJxtAACgkQhmBjz394AnltHgCbBJh7vK0W3daJhU1m0hMIAD7X fqgAn3e+sDTKPrzEJb9AELu1bL3B90yN =ANMQ -----END PGP SIGNATURE----- --------------enigEBCD5E311B7CF24C1C2CEE2B--