RE: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Daevid Vincent
Are you serious? mySQL 5.0 does NOT have a > RENAME DATABASE? > > Don't forget triggers, stored routines, views, database/table > specific user permissions, and replication/binlog options! > > Regards, > Gavin Towey > > -Original Message- > From: Sarava

RE: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Gavin Towey
t: Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE? if you have myisam alone tables you can rename the folder of the database. That can work like rename database. If you have innodb table you have to move one by one table because details of those tables will be stored in innodb s

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Saravanan
if you have myisam alone tables you can rename the folder of the database. That can work like rename database. If you have innodb table you have to move one by one table because details of those tables will be stored in innodb shared table space. Moving folder cannot work. Thanks, Saravanan

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Johan De Meersman
On Fri, Dec 11, 2009 at 10:40 PM, Daevid Vincent wrote: > Will this work in 5.0? > Yes. > If I'm reading this right, it seems like this is some kind of trick or > loophole then right? If it works and solves my dilemna, I'm fine with that, > but I'm just curious. > Not really, this is by desig

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Michael Dykman
; Sent: Friday, December 11, 2009 6:08 AM >> To: MySql >> Subject: Re: Are you serious? mySQL 5.0 does NOT have a >> RENAME DATABASE? >> >> If you want to move the database atomically,  a RENAME TABLE statement >> may have multiple clauses. >> >> RENA

RE: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Daevid Vincent
mv' command where it simply changing pointers or is it a full on copy/rm? (Assume same filesystem/directory) > -Original Message- > From: Michael Dykman [mailto:mdyk...@gmail.com] > Sent: Friday, December 11, 2009 6:08 AM > To: MySql > Subject: Re: Are you serious? mySQ

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Michael Dykman
According to MySQL docs, it should still work atomically. Granted, I have only used this particular trick when they are on the same filesystem. Copying across filesystems, I imagine it should still be atomic, but your system may be locked for awhile. Obviously, a dedicated RENAME DATABASE

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Jim Lyons
Can you use that syntax if the databases are on different file systems? If you can, and the original table is big, the command would take a while as it moved data from one file system to another. On Fri, Dec 11, 2009 at 7:58 AM, Johan De Meersman wrote: > On Fri, Dec 11, 2009 at 1:56 PM, Ken D'A

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Michael Dykman
If you want to move the database atomically, a RENAME TABLE statement may have multiple clauses. RENAME TABLE olddb.foo to newdb.foo, olddb.bar to newdb.bar; Here, I hot-swap a new lookup table 'active.geo' into a live system confident that, at any given point, some version of this t

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Johan De Meersman
On Fri, Dec 11, 2009 at 1:56 PM, Ken D'Ambrosio wrote: > > rename table oldschema.table to newschema.table; > > Just to be 100% clear -- I assume you have to first create the destination > database, and then do this for all the tables in the source database? > Yep. Easily scriptable, though :-)

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Ken D'Ambrosio
week to do (3 days each way and that doesn't >>> even begin to touch on the fact the server would be down)! WTF!? >>> >>> We're running Ubuntu LTS 8.04 w/ Ver 14.12 Distrib 5.0.51a, for >>> debian-linux-gnu (i486) using readline 5.2 >>> >>> Ev

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Johan De Meersman
nning Ubuntu LTS 8.04 w/ Ver 14.12 Distrib 5.0.51a, for > > debian-linux-gnu (i486) using readline 5.2 > > > > Even the manual for 5.1 says this can lose data: > > http://dev.mysql.com/doc/refman/5.1/en/rename-database.html > > "This statement was added in MySQL

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-10 Thread Ken D'Ambrosio
7 but was found to be dangerous and > was removed in MySQL 5.1.23...However, use of this statement could > result in loss of database contents, which is why it was removed. Do not > use RENAME DATABASE in earlier versions in which it is present." > > > Seriously? Please ex

Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-10 Thread Daevid Vincent
dangerous and was removed in MySQL 5.1.23...However, use of this statement could result in loss of database contents, which is why it was removed. Do not use RENAME DATABASE in earlier versions in which it is present." Seriously? Please explain why a simple rename of a database is such a d

Re: Rename Database - Why Would This Not Work?

2009-11-23 Thread Rob Wultsch
On Mon, Nov 23, 2009 at 7:37 AM, Johan De Meersman wrote: > You don't even need to stop the server afaik. As mentioned previously, > though, works for MyISAM only. > While this is strictly true there are some big caveats (flushing tables, etc). It is safer to shut down the database before moving

Re: Rename Database - Why Would This Not Work?

2009-11-23 Thread Johan De Meersman
You don't even need to stop the server afaik. As mentioned previously, though, works for MyISAM only. On Mon, Nov 23, 2009 at 3:17 PM, Robinson, Eric wrote: > >RENAME TABLE > > olddb.table1 TO newdb.table1, > > olddb.table2 TO newdb.table2 > > >put the whole list in here, the whole statement

Re: Rename Database - Why Would This Not Work?

2009-11-23 Thread Jim Lyons
Does this work if any of the tables are InnoDB? On Mon, Nov 23, 2009 at 8:17 AM, Robinson, Eric wrote: > >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 > > The dat

RE: Rename Database - Why Would This Not Work?

2009-11-23 Thread Robinson, Eric
>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 The database has 1200+ tables, so your approach seems like more work to me. As it is, all I'm doing is: service mysql stop m

Re: Rename Database - Why Would This Not Work?

2009-11-22 Thread 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 who

Re: Rename Database - Why Would This Not Work?

2009-11-22 Thread Rob Wultsch
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

RE: Rename Database - Why Would This Not Work?

2009-11-21 Thread Robinson, Eric
> 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

Re: Rename Database - Why Would This Not Work?

2009-11-21 Thread Rob Wultsch
DB engines that have their own data dictionary (Innodb, etc) in addition to what is in the .frm could easily be messed up. On Sat, Nov 21, 2009 at 10:38 AM, Robinson, Eric wrote: > I used a simple procedure to rename my MySQL 4.1.22 database, which has > only My-ISAM tables: > > 1. Stopped MySQL

Rename Database - Why Would This Not Work?

2009-11-21 Thread Robinson, Eric
I used a simple procedure to rename my MySQL 4.1.22 database, which has only My-ISAM tables: 1. Stopped MySQL 2. Renamed the database directory from olddbname to newdbname 3. Started mysql At this point, I grepped for 'olddbname' and found that many of the old .MYI files still had references to

Re: R: rename database in 4.1

2008-02-12 Thread Ken Menzel
Nanni Claudio wrote: You can try to dump-to-sql the whole DB, Create a new DB and import the sql-dump in the new DB. Aloha! Claudio -Messaggio originale- Da: Thomas Raso [mailto:[EMAIL PROTECTED] Inviato: martedì 12 febbraio 2008 17.20 A: mysql@lists.mysql.com Oggetto: rename

R: rename database in 4.1

2008-02-12 Thread Nanni Claudio
You can try to dump-to-sql the whole DB, Create a new DB and import the sql-dump in the new DB. Aloha! Claudio -Messaggio originale- Da: Thomas Raso [mailto:[EMAIL PROTECTED] Inviato: martedì 12 febbraio 2008 17.20 A: mysql@lists.mysql.com Oggetto: rename database in 4.1 hi list

rename database in 4.1

2008-02-12 Thread Thomas Raso
hi list, how can I rename a database with full innodb tables ? The version is 4.1 Thnaks all

Re: How to rename database name

2006-12-08 Thread Dominik Klein
1. 'mysqldump' the current database, drop it and create a new database. Move the dumped data into the new database. This should work with any engine. 2. Stop mysqld. Rename the database folder in the datadirectory. Start the server and grant access permissions This does imho only work for

Re: How to rename database name

2006-12-08 Thread Visolve DB Team
ViSolve DB Team. - Original Message - From: "jagdish gunjal" <[EMAIL PROTECTED]> To: Sent: Friday, December 08, 2006 10:25 AM Subject: How to rename database name Hi all, Does any know command to rename the database name in Mysql db. --

How to rename database name

2006-12-07 Thread jagdish gunjal
Hi all, Does any know command to rename the database name in Mysql db. - Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it

Re: rename database

2005-11-07 Thread SGreen
re are probably several places that need > to be changed, but I don't know where those are. Could someone point me in > the right direction? > > Thanks, > Jesse > There is no command to RENAME DATABASE in MySQL. However you can create a new, empty database and populate it

rename database

2005-11-07 Thread Jesse Castleberry
How can I rename a database in MySQL 5? I've tried renaming he folder, and that just causes other problems. Some one sent me a stored procedure to try, but it will not execute. There are probably several places that need to be changed, but I don't know where those are. Could someone point me in

RE: Rename database

2004-05-20 Thread emierzwa
ECTED] Sent: Thursday, May 20, 2004 2:53 PM To: [EMAIL PROTECTED] Subject: RE: Rename database Is there anything wrong with just stopping the server and renaming the database's directory in the DATA directory? I've used that method without any problems. It also works very well for makin

RE: Rename database

2004-05-20 Thread Victor Pendleton
innodb and dbd -Original Message- From: Ed Reed To: [EMAIL PROTECTED] Sent: 5/20/04 3:52 PM Subject: RE: Rename database Is there anything wrong with just stopping the server and renaming the database's directory in the DATA directory? I've used that method without any problem

RE: Rename database

2004-05-20 Thread Ed Reed
y 20, 2004 4:50 PM To: [EMAIL PROTECTED] Subject: Rename database Hi, Is there a way I can rename a database? or at least copy an old database with existing tables into a new one? Thanks. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://list

RE: Rename database

2004-05-20 Thread Bartis, Robert M (Bob)
http://dev.mysql.com/doc/mysql/en/RENAME_TABLE.html -Original Message- From: Ngim Ngau - Kzresults [mailto:[EMAIL PROTECTED] Sent: Thursday, May 20, 2004 4:50 PM To: [EMAIL PROTECTED] Subject: Rename database Hi, Is there a way I can rename a database? or at least copy an old database

Rename database

2004-05-20 Thread Ngim Ngau - Kzresults
Hi, Is there a way I can rename a database? or at least copy an old database with existing tables into a new one? Thanks. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: rename database

2004-04-16 Thread Victor Pendleton
Thanks for the information. -Original Message- From: Paul DuBois To: Victor Pendleton; '''Chen, Jenny ' ' '; ''''[EMAIL PROTECTED]' ' ' ' Sent: 4/16/04 11:18 AM Subject: RE: rename database At 11:03 -0500 4/16/04,

RE: rename database

2004-04-16 Thread Paul DuBois
27;; '''[EMAIL PROTECTED]' ' ' Sent: 4/16/04 10:55 AM Subject: RE: rename database Oversight on my part. This will not work for those table types. -Original Message- From: Paul DuBois To: Victor Pendleton; 'Chen, Jenny '; ''[EMAIL PROTECTED]&

RE: rename database

2004-04-16 Thread Victor Pendleton
Paul, Do you know if there will be an ALTER DATABASE RENAME curName TO newName implementation? -Original Message- From: Victor Pendleton To: 'Paul DuBois '; Victor Pendleton; ''Chen, Jenny ' '; '''[EMAIL PROTECTED]' ' ' Sent:

RE: rename database

2004-04-16 Thread Victor Pendleton
Oversight on my part. This will not work for those table types. -Original Message- From: Paul DuBois To: Victor Pendleton; 'Chen, Jenny '; ''[EMAIL PROTECTED]' ' Sent: 4/16/04 10:43 AM Subject: RE: rename database At 10:28 -0500 4/16/04, Victor Pendleton wr

RE: rename database

2004-04-16 Thread Paul DuBois
At 10:28 -0500 4/16/04, Victor Pendleton wrote: You can rename it at the filesystem level. What if you have InnoDB or BDB tables? -Original Message- From: Chen, Jenny To: '[EMAIL PROTECTED]' Sent: 4/16/04 10:18 AM Subject: rename database Experts: Is it possible to renam

RE: rename database

2004-04-16 Thread Chen, Jenny
Thanks that's easy. -Original Message- From: Victor Pendleton [mailto:[EMAIL PROTECTED] Sent: Friday, April 16, 2004 10:28 AM To: 'Chen, Jenny '; ''[EMAIL PROTECTED]' ' Subject: RE: rename database You can rename it at the filesystem level. -Orig

RE: rename database

2004-04-16 Thread Victor Pendleton
You can rename it at the filesystem level. -Original Message- From: Chen, Jenny To: '[EMAIL PROTECTED]' Sent: 4/16/04 10:18 AM Subject: rename database Experts: Is it possible to rename existing database ? -- MySQL General Mailing List For list archives: http://lists.mysql

rename database

2004-04-16 Thread Chen, Jenny
Experts: Is it possible to rename existing database ? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: mysql command to rename database

2003-12-02 Thread Jared Klett
hi Joffrey, You can manually rename the directory that contains the file for the database you want to rename. Make sure to do this while mysqld is off. So if we wanted to rename database "foo": % cd /usr/local/mysql/data % ls -l drwx-- 2staff512 Sep 28 19:58 m

mysql command to rename database

2003-12-02 Thread joffrey leevy
I am ashamed to ask this but I really did not see this in the manual or elsewhere. What is the command to rename a database? __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- MySQL General Mailing List For list archives: http://

re: Fw: Rename Database

2002-10-03 Thread Victoria Reznichenko
William, Tuesday, October 02, 2001, 11:18:48 AM, you wrote: >> I am curious how to rename a database in MySQL 4.0 running on win2k >> server. If your database contains only ISAM/MyISAM tables you can do it like - shutdown MySQL server - rename database dir - restart MySQL serv

Fw: Rename Database

2002-10-02 Thread William Martell
[FILTER:sql, query, database, MySQL] - Original Message - From: "William Martell" <[EMAIL PROTECTED]> To: "win32 MySQL List" <[EMAIL PROTECTED]> Sent: Tuesday, October 02, 2001 1:27 AM Subject: Rename Database > Hello All, > > I am curious how

Re: rename database

2002-09-27 Thread Support
27, 2002 11:57 AM Subject: rename database > Exists any way to rename a database ? > > Thanks Jorge > > sql > > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the man

Re: rename database

2002-09-27 Thread Clayburn W. Juniel, III
On Friday, September 27, 2002, at 07:57 AM, Jorge Martinez wrote: > Exists any way to rename a database ? > > Thanks Jorge > > sql You can create a new database and then: Rename Table old_database.table_name to new_database.table_name. You would have to do this for every table. You could t

rename database

2002-09-27 Thread Jorge Martinez
Exists any way to rename a database ? Thanks Jorge sql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e

RE: Is it possible to Rename Database

2001-10-03 Thread Daniel Ouellet
en; Brandon Lewis; [EMAIL PROTECTED] > Subject: RE: Is it possible to Rename Database > > > Or, use mysqldump to dump the entire database, edit the CREATE > DATABASE line > at the top to the new name and pipe it all back into mysql, then drop the > old one? > >

Re: Is it possible to Rename Database

2001-10-03 Thread Ken Menzel
It's the only way with InnoDB short of renaming each table in the format: RENAME TABLE olddb.table1 TO newdb.table1 Ken > > That's sort of taking the long way around the barn, isn't it? > > Will > - Before posting, please check

RE: Is it possible to Rename Database

2001-10-03 Thread Will French
ginal Message- > From: Ravi Raman [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 03, 2001 6:04 PM > To: Carsten H. Pedersen; Brandon Lewis; [EMAIL PROTECTED] > Subject: RE: Is it possible to Rename Database > > > Or, use mysqldump to dump the entire database, edit the

RE: Is it possible to Rename Database

2001-10-03 Thread Ravi Raman
; [EMAIL PROTECTED] Subject: RE: Is it possible to Rename Database > Is it possible to rename a database? I would assume that the only way to do is is to shut down the server, then rename the directory of the database. / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit

RE: Is it possible to Rename Database

2001-10-03 Thread Carsten H. Pedersen
> Is it possible to rename a database? I would assume that the only way to do is is to shut down the server, then rename the directory of the database. / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq -

Re: Is it possible to Rename Database

2001-10-03 Thread Ken Menzel
Hi Brandon, It is possible if you are you are using myisam or DBD table types, but you have to rename the directory from the Unix shell prompt. There is not yet a RENAME DATABASE command (althought it is on the todo list) and no way that I know of (short of renaming each table if you only have

Is it possible to Rename Database

2001-10-03 Thread Brandon Lewis
Is it possible to rename a database? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]>