Copy All MySQL Databases to a New Server
mysqldump –all-databases -uroot -pYourPassword | ssh username@192.168.19.121 mysql -uroot -pYourPassword
note there should be 2 dashes – – before all-database but the browser joins them
you run this on the server that has all the data
it pushes it to the new server via SSH
-u = user
-p = password
but there is no space between the flag and the username/password
for copying individual databases the command changes slightly:
mysqldump –databases db1 db2 db6 -uroot -pYourPassword | ssh username@192.168.19.121 mysql -uroot -pYourPassword
note there should be 2 dashes – – before databases but the browser joins them
On the new server:
Make sure to run
FLUSH PRIVILEGES;
from a mysql command prompt or you’ll probably have authentication issues.