cat how-to-move-a-database-from-one-box-to-another.md
How to move a mysql database from one box to another
Simple reference, moving a mysql database:
mysqldump -h <oldhostip/name> -u username -p[<password>] <databasename> > <dumpfilename>.sql
mysql -u<username> -p[<password>] < <dumpfilename>.sqlNote
Note: The lack of spaces in some places of the commands. They are intended.
Note: Specifying the password after-pis[]'d, which means it's optional.
Note: If you do enter a password on the command line, it will get saved in your.bash_historyor similar in clear text.
Comments