Renaming a database?
am 24.05.2011 17:19:19 von Jerry Schwartz
------=_NextPart_000_0044_01CC1A04.6DD29390
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
It looks like thereâ=99s no way to rename a database. Is that true?
=20
I have two reasons for wanting to do this:
=20
- I want to get a current version of a database out of the way so that I =
can load in an older version, without having to pay the penalty of =
reloading the current version.
- I think I have a database that isnâ=99t being used (donâ=99t =
ask), and I want to hide it to see if anything blows up.
=20
Suggestions?
=20
Regards,
=20
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
=20
860.674.8796 / FAX: 860.674.8341
E-mail: jerry@gii.co.jp=20
Web site: www.the-infoshop.com
=20
------=_NextPart_000_0044_01CC1A04.6DD29390--
Re: Renaming a database?
am 24.05.2011 17:31:09 von Andrew Moore
--20cf303f634af9e8f804a407464c
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
Instead of renaming it, revoke permissions to it. If it's being used you
should see some problems in the application due to access denied.
Andy
On Tue, May 24, 2011 at 4:19 PM, Jerry Schwartz wrote:
> It looks like there=92s no way to rename a database. Is that true?
>
>
>
> I have two reasons for wanting to do this:
>
>
>
> - I want to get a current version of a database out of the way so that I
> can load in an older version, without having to pay the penalty of reload=
ing
> the current version.
>
> - I think I have a database that isn=92t being used (don=92t ask), and I =
want
> to hide it to see if anything blows up.
>
>
>
> Suggestions?
>
>
>
> Regards,
>
>
>
> Jerry Schwartz
>
> Global Information Incorporated
>
> 195 Farmington Ave.
>
> Farmington, CT 06032
>
>
>
> 860.674.8796 / FAX: 860.674.8341
>
> E-mail: jerry@gii.co.jp
>
> Web site: www.the-infoshop.com
>
>
>
>
--20cf303f634af9e8f804a407464c--
Re: Renaming a database?
am 24.05.2011 17:51:57 von Johan De Meersman
----- Original Message -----
> From: "Jerry Schwartz"
>
> It looks like thereâ=99s no way to rename a database. Is that true?
Yes. Silly oversight, although there's probably complexity reasons behind i=
t.
> - I want to get a current version of a database out of the way so
> that I can load in an older version, without having to pay the
> penalty of reloading the current version.
That precludes "rename table db1.blah to db2.blah", I guess - it basically =
copies the whole thing and then kills the old one. Slowwwwww for big tables=
:-)
> - I think I have a database that isnâ=99t being used (donâ=99t =
ask), and I
> want to hide it to see if anything blows up.
If you are in a position to shut your server down, you may rename the datab=
ase directory while it's down IF you only use MyISAM tables.
If you have InnoDB tables, you're stuck with dump/reload or rename table.
--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel
--
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
RE: Renaming a database?
am 24.05.2011 20:40:05 von Jerry Schwartz
>-----Original Message-----
>From: Johan De Meersman [mailto:vegivamp@tuxera.be]
>Sent: Tuesday, May 24, 2011 11:52 AM
>To: Jerry Schwartz
>Cc: mysql@lists.mysql.com
>Subject: Re: Renaming a database?
>
>----- Original Message -----
>> From: "Jerry Schwartz"
>>
>> It looks like there's no way to rename a database. Is that true?
>
>Yes. Silly oversight, although there's probably complexity reasons behind it.
>
[JS] According to the documentation, this was implemented at one time but it
caused problems so the feature was removed.
Regards,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
E-mail: jerry@gii.co.jp
Web site: www.the-infoshop.com
>> - I want to get a current version of a database out of the way so
>> that I can load in an older version, without having to pay the
>> penalty of reloading the current version.
>
>That precludes "rename table db1.blah to db2.blah", I guess - it basically
>copies the whole thing and then kills the old one. Slowwwwww for big tables
>:-)
>
>> - I think I have a database that isn't being used (don't ask), and I
>> want to hide it to see if anything blows up.
>
>If you are in a position to shut your server down, you may rename the
>database
>directory while it's down IF you only use MyISAM tables.
>
>If you have InnoDB tables, you're stuck with dump/reload or rename table.
>
>
>--
>Bier met grenadyn
>Is als mosterd by den wyn
>Sy die't drinkt, is eene kwezel
>Hy die't drinkt, is ras een ezel
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
RE: Renaming a database?
am 24.05.2011 20:40:05 von Jerry Schwartz
>-----Original Message-----
>From: Andrew Moore [mailto:eroomydna@gmail.com]
>Sent: Tuesday, May 24, 2011 11:31 AM
>To: Jerry Schwartz
>Cc: mysql@lists.mysql.com
>Subject: Re: Renaming a database?
>
>Instead of renaming it, revoke permissions to it. If it's being used you
>should see some problems in the application due to access denied.
>
[JS] That's a good suggestion. It takes care of one case, but not the other.
Regards,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
E-mail: jerry@gii.co.jp
Web site: www.the-infoshop.com
>Andy
>
>On Tue, May 24, 2011 at 4:19 PM, Jerry Schwartz wrote:
>
>> It looks like there's no way to rename a database. Is that true?
>>
>>
>>
>> I have two reasons for wanting to do this:
>>
>>
>>
>> - I want to get a current version of a database out of the way so that I
>> can load in an older version, without having to pay the penalty of
>> reloading
>> the current version.
>>
>> - I think I have a database that isn't being used (don't ask), and I want
>> to hide it to see if anything blows up.
>>
>>
>>
>> Suggestions?
>>
>>
>>
>> Regards,
>>
>>
>>
>> Jerry Schwartz
>>
>> Global Information Incorporated
>>
>> 195 Farmington Ave.
>>
>> Farmington, CT 06032
>>
>>
>>
>> 860.674.8796 / FAX: 860.674.8341
>>
>> E-mail: jerry@gii.co.jp
>>
>> Web site: www.the-infoshop.com
>>
>>
>>
>>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: Renaming a database?
am 24.05.2011 20:55:37 von Andrew Moore
--0023547c8a2937f51004a40a22b8
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
Could you try restoring the other db with another name and changing the
connection string in the app?
On 24 May 2011 16:20, "Jerry Schwartz" wrote:
> It looks like there=92s no way to rename a database. Is that true?
>
>
>
> I have two reasons for wanting to do this:
>
>
>
> - I want to get a current version of a database out of the way so that I
can load in an older version, without having to pay the penalty of reloadin=
g
the current version.
>
> - I think I have a database that isn=92t being used (don=92t ask), and I =
want
to hide it to see if anything blows up.
>
>
>
> Suggestions?
>
>
>
> Regards,
>
>
>
> Jerry Schwartz
>
> Global Information Incorporated
>
> 195 Farmington Ave.
>
> Farmington, CT 06032
>
>
>
> 860.674.8796 / FAX: 860.674.8341
>
> E-mail: jerry@gii.co.jp
>
> Web site: www.the-infoshop.com
>
>
>
--0023547c8a2937f51004a40a22b8--
RE: Renaming a database?
am 24.05.2011 22:16:17 von Jerry Schwartz
------=_NextPart_000_00A0_01CC1A2D.EBE6BE40
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
=20
From: Andrew Moore [mailto:eroomydna@gmail.com]=20
Sent: Tuesday, May 24, 2011 2:56 PM
To: Jerry Schwartz
Cc: mysql@lists.mysql.com
Subject: Re: Renaming a database?
=20
Could you try restoring the other db with another name and changing the =
connection string in the app?
[JS] I could, but it would be a nuisance. The app is MS Access, so there =
isnâ=99t just one string to change.
Fortunately my database only takes about 30 minutes to load, so this =
wasnâ=99t a huge problem. I just wanted to make sure I =
wasnâ=99t missing something.
=20
Regards,
=20
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
=20
860.674.8796 / FAX: 860.674.8341
E-mail: jerry@gii.co.jp=20
Web site: www.the-infoshop.com =20
=20
=20
On 24 May 2011 16:20, "Jerry Schwartz" wrote:
> It looks like thereâ=99s no way to rename a database. Is that =
true?
>=20
>=20
>=20
> I have two reasons for wanting to do this:
>=20
>=20
>=20
> - I want to get a current version of a database out of the way so that =
I can load in an older version, without having to pay the penalty of =
reloading the current version.
>=20
> - I think I have a database that isnâ=99t being used =
(donâ=99t ask), and I want to hide it to see if anything blows up.
>=20
>=20
>=20
> Suggestions?
>=20
>=20
>=20
> Regards,
>=20
>=20
>=20
> Jerry Schwartz
>=20
> Global Information Incorporated
>=20
> 195 Farmington Ave.
>=20
> Farmington, CT 06032
>=20
>=20
>=20
> 860.674.8796 / FAX: 860.674.8341
>=20
> E-mail: jerry@gii.co.jp=20
>=20
> Web site: www.the-infoshop.com
>=20
>=20
>=20
------=_NextPart_000_00A0_01CC1A2D.EBE6BE40--
RE: Renaming a database?
am 24.05.2011 22:41:38 von Daevid Vincent
> -----Original Message-----
> On Tue, May 24, 2011 at 4:19 PM, Jerry Schwartz =
wrote:
>=20
> > It looks like thereâ=99s no way to rename a database. Is that =
true?
I know. Retarded right? Version 5.1.x and still what would seem the most =
basic of tasks is still impossible.=20
Maybe Oracle can fix what MontyAB and Sun couldn't... that feature alone =
would be well worth the $5.6 Billion dollars spent.
I just had a need to do this last week and was astonished to find it's =
still not implemented after all these... well ever! I unfortunately had =
to dump the database to a .sql file, edit said file, re-dump in, then =
dump in the new database, then run a SQL diff tool to find out what =
schemata and data was different. The whole process delayed me a few =
hours that I didn't budget for. Talk about a hindrance.=20
-----
And before anyone gets all upset with my use of the word "Retarded"...
Read this: http://dev.mysql.com/doc/refman/5.1/en/rename-database.html
And then the definition:
reâ=A2tardâ=A2ed
â=93verb (used with object)
1. to make slow; delay the development or progress of (an action, =
process, etc.); hinder or impede.
â=93verb (used without object)
2. to be delayed.
--
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