Created
April 24, 2017 22:57
-
-
Save kolunar/f07aa6ac2752640db1efe0f619889220 to your computer and use it in GitHub Desktop.
MySQL Cloning the database using mysql-utilities' mysqldbcopy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldbcopy is part of mysql-utilities. | |
apt-get install mysql-utilities (if not yet installed) | |
Usage: mysqldbcopy --source=user:pass@host:port:socket --destination=user:pass@host:port:socket orig_db:new_db | |
Example: | |
mysqldbcopy --source=user_name:password@localhost:3306 --destination=user_name:password@localhost:3306 mddb:mddb_demo | |
Working Example: | |
su root; | |
mysqldbcopy --source=root@localhost:3306 --destination=root@localhost:3306 yddb:yddb_bk | |
su root; | |
mysqldbcopy --source=joomla_user:df*********s@localhost:3306 --destination=joomla_user:df*********s@localhost:3306 mddb:mddb_bk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment