Is it posible to duplicate an entire MySQL database on a linux server?
I know I can use export and import but the original database is >25MB so that\'s not ideal.
This won't work for InnoDB. Use this workaround only if you are trying to copy MyISAM databases.
If locking the tables during backup, and, possibly, pausing MySQL during the database import is acceptable, mysqlhotcopy may work faster.
# mysqlhotcopy -u root -p password db_name /path/to/backup/directory
cp /path/to/backup/directory/* /var/lib/mysql/db_name
mysqlhotcopy can also transfer files over SSH (scp), and, possibly, straight into the duplicate database directory.
# mysqlhotcopy -u root -p password db_name /var/lib/mysql/duplicate_db_name