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 mv

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 eric.robin...@psmnv.comwrote: 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

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 eric.robin...@psmnv.comwrote: RENAME TABLE olddb.table1 TO newdb.table1, olddb.table2 TO newdb.table2 put the whole list in here, the

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 vegiv...@tuxera.bewrote: 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

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 eric.robin...@psmnv.comwrote: 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

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

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 eric.robin...@psmnv.comwrote: I used a simple procedure to rename my MySQL 4.1.22 database, which has only My-ISAM tables:

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

2005-11-07 Thread SGreen
Jesse Castleberry [EMAIL PROTECTED] wrote on 11/07/2005 01:31:54 PM: 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

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

RE: Rename database

2004-05-20 Thread Ed Reed
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 making a copy of the database to a new differently named database. Are there any pitfalls that I haven't

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 problems. It also

RE: Rename database

2004-05-20 Thread emierzwa
] 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 making a copy

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.com/mysql

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. -Original Message- From: Chen, Jenny

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 rename existing

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 wrote: You can rename

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: 4/16/04 10:55 AM Subject: RE: rename database Oversight

RE: rename database

2004-04-16 Thread Paul DuBois
: 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]' ' Sent: 4/16/04 10:43 AM Subject: RE: rename database At 10:28 -0500 4/16/04, Victor

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, Victor Pendleton wrote: Paul, Do you know if there will be an ALTER

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 then

Re: rename database

2002-09-27 Thread Support
From what I heard, yes. If you stop MySQL, then rename the dir/database. It may work. Worked for me (did it about 3 months ago). HTH, Ricardo. - Original Message - From: Jorge Martinez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 27, 2002 11:57 AM Subject: rename