You are here: Home Tech Notes Linux Linux CLI: Copy MySQL Database
Linux CLI: Copy MySQL Database PDF Print E-mail
User Rating: / 0
PoorBest 
Tech Notes - Linux
Written by Rick   
Tuesday, 06 April 2010 11:57

There is no command in MySQL to copy a database. One method to copy a database is as follows;

  1. Create a new empty database.
  2. Export the source database using mysqldump.
  3. Import the database to the new empty database created in step 1 above.

(See Linux CLI: MySQL Database Backup & Restore article for mysqldump usage).

Alternatively, phpMyAdmin can be used for small databases. More often-than-not, databases exceed size limits imposed by phpMyAdmin forcing CLI use or another method.

Comments (0)
Write comment
Your Contact Details:
Gravatar enabled
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):S
:!::?::idea::arrow:
Security
Please input the anti-spam code that you can read in the image.