Re: How to rename a DB

2006-05-05 Thread Gabriel PREDA
I think the correct way... as planned for the 5.1 release is as follows: -- -- Start renaming database named "old_db" into "new_db" CREATE DATABASE new_db; ALTER TABLE old_db.table_1 RENAME new_db.table1; ALTER TABLE old_db.table_2 RENAME new_db.table2; ..

Re: How to rename a DB

2006-05-05 Thread Peter Brawley
Hardi Have a look at "Rename Database" at http://www.artfulsoftware.com/queries.php#16 PB Hardi OK wrote: Hi, Anybody know how can i safely and easily rename a database in MySQL 5.0.19. Have tried some tips from google results (most of them are for MySQL 4.x) but no luck till now

RE: How to rename a DB

2006-05-05 Thread George Law
DOH! Sorry - I totally misread the question! A quick google for "rename database" shows Adrian is correct! -Original Message- From: Adrian Bruce [mailto:[EMAIL PROTECTED] Sent: Friday, May 05, 2006 9:51 AM To: George Law Cc: Hardi OK; mysql@lists.mysql.com Subject:

Re: How to rename a DB

2006-05-05 Thread Adrian Bruce
Stop the server, go to the MySQL data directory and physically change the name of the directory that corresponds to the database. Restart MySQL server and SHOW DATABASES to see the change take effect. George Law wrote: Hardi I rotate tables out on a monthly basis. The way I do it is: ren

RE: How to rename a DB

2006-05-05 Thread George Law
Hardi I rotate tables out on a monthly basis. The way I do it is: rename table1 to table2 If you need a new copy of table1, you can do : create table table1 like table2 -- George -Original Message- From: Hardi OK [mailto:[EMAIL PROTECTED] Sent: Thursday, May 04, 2006 11:19 PM To