Created
July 2, 2024 07:22
-
-
Save HakamRaza/b2c7046abac39a3fe9edd74b91025bbd to your computer and use it in GitHub Desktop.
Clone DB Mysql In Same Instance
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
mysql --user=username --password=passwd -e 'DROP DATABASE IF EXISTS test_db;' | |
mysql --user=username --password=passwd -e 'CREATE DATABASE test_db;' | |
mysqldump --user=username --password=passwd live_db | mysql --user=username --password=passwd test_db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment