1/04/2015

MySQL: How to clone a database

Here's one way of duplicating a mysql database:
1. Make a dump of the source database: If you only want to dump the structure simply add --no-data to the end of the above command. 2. Open up a MySQL shell: 3. Within the MySQL shell, create a new database and populate it with the dumped data: 4. Optionally create a new user. Give permissions to the new database: