MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:October 11 2002 10:59pm
Subject:Re: copy one database to another
View as plain text  
At 11:01 +0530 10/11/02, Insanely Great wrote:
>I dont think that there is any SQL statement to do that.
>As of changing the name, You can just go to the data directory of MySQL and
>change the name of the directory of the database. MySQL stores each database
>as a directoyr so changing the name of the directory will change the name of
>the database.

Make sure to FLUSH TABLES first.  But it won't work if you have InnoDB
tables, and isn't supported if you have BDB tables.

>I have tried this with MyISAM and ISAM tables, not sure of other table

See above.

Best just to do what others have suggested: use mysqldump to dump
the database, create the new database, and reload the dump file into

>SQLyog - The Definative GUI for MySQL
>----- Original Message -----
>From: "Scott Pippin" <spippin@stripped>
>To: <mysql@stripped>
>Sent: Friday, October 11, 2002 4:25 AM
>Subject: copy one database to another
>>  I have one database(test) i would like to copy over to (test1).  Ehat is
>>  the syntax to do this?  Is there any to just change the name of the
>>  database?
>>  Thanks in advance
>  > (query, mysql)

copy one database to anotherScott Pippin11 Oct
  • Re: copy one database to anotherInsanely Great11 Oct
    • RE: copy one database to anotherEd Carp11 Oct
    • Re: copy one database to anotherPaul DuBois12 Oct
RE: copy one database to anotherSimon Green11 Oct