List:General Discussion« Previous MessageNext Message »
From:Adrian Bruce Date:May 5 2006 1:51pm
Subject:Re: How to rename a DB
View as plain text  
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:
>
> 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:hahahardididi@stripped] 
> Sent: Thursday, May 04, 2006 11:19 PM
> To: mysql@stripped
> Subject: How to rename a DB
>
> 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.
> Any help would be greatly appreciated.
>
> Rgds/Hardi
>
>   
Thread
How to rename a DBHardi OK5 May
  • Re: How to rename a DBPeter Brawley5 May
  • Re: How to rename a DBGabriel PREDA5 May
RE: How to rename a DBGeorge Law5 May
  • Re: How to rename a DBAdrian Bruce5 May
RE: How to rename a DBGeorge Law5 May