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

2009-12-11 Thread Johan De Meersman
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 explain why a simple rename

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

2009-12-11 Thread Ken D'Ambrosio
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 daunting task to mySQL/Sun

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 k...@jots.org 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,

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

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 vegiv...@tuxera.bewrote: On Fri, Dec 11, 2009

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 Daevid Vincent
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? mySQL 5.0 does NOT have a RENAME DATABASE? If you

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

2009-12-11 Thread Michael Dykman
5.0 does NOT have a RENAME DATABASE? 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

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 dae...@daevid.com 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

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 Gavin Towey
: 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 shared

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

2009-12-11 Thread Daevid Vincent
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: Saravanan [mailto:suzuki_b...@yahoo.com] Sent: Friday, December 11, 2009 2:02 PM To: MySql

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

2009-12-10 Thread Daevid Vincent
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 daunting task to mySQL/Sun that all their brilliant

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

2009-12-10 Thread Ken D'Ambrosio
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 daunting task to mySQL/Sun that all their brilliant minds can't figure this one out? Why isn't there even a bug

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

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

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: 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 Visolve DB Team
Team. - Original Message - From: jagdish gunjal [EMAIL PROTECTED] To: mysql@lists.mysql.com 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. - Find out

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

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

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

Re: rename database

2005-11-07 Thread SGreen
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 with data 2 ways: A) rename all of the table so that their name

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-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
encountered yet? Thanks Bartis, Robert M (Bob) [EMAIL PROTECTED] 5/20/04 1:37:20 PM 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

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

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: 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

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:

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-- 2 your uid staff512 Sep 28 19:58 mysql

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 server -- For technical

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 to rename a database in MySQL 4.0 running on win2k

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,

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

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]

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

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 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.dk MySQL

RE: Is it possible to Rename Database

2001-10-03 Thread Daniel Ouellet
; [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? -ravi -Original Message- From: Carsten H. Pedersen