Created
July 11, 2023 12:29
-
-
Save zckkte/d58b0366c509b1459615393d048ae62e to your computer and use it in GitHub Desktop.
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
# export mysql database | |
mysqldump -u username -p database_name > data-dump.sql | |
# Check if a sql script is a legit sql dump file | |
head -n 5 prodbck_anon_reduced.sql | grep dump ; echo $? | |
# import | |
mysql -u root -p | |
CREATE DATABASE new_database; | |
mysql -u username -p new_database < data-dump.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment