Created
December 20, 2013 16:04
-
-
Save DarkPark/8056919 to your computer and use it in GitHub Desktop.
mysql db management
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
# set pass in command line (non-interactive) | |
mysqladmin -u root password "some_new_password" | |
# set pass in command line (interactive) | |
mysqladmin -u root password | |
# login | |
mysql -u[name] -p[pass] [database] | |
# create backup | |
mysqldum -u[name] -p[pass] [database] > backup.sql | |
# create backup for all databases | |
mysqldum -u[name] -p[pass] --all-databases > backup.sql | |
# restore backup file | |
mysql -u[name] -p[pass] [database] < backup.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment