FozzieBeer FozzieBeer - 3 months ago 9
MySQL Question

MySQL - Move everything to a new server

What's the easiest way to move mysql schemas (tables, data, everything) from one server to another?

Is there an easy method move all this from one server running mysql to another also already running mysql?

Answer

Dump the Database either using mysqldump or if you are using PHPMyAdmin then Export the structure and data.

For mysqldump you will require the console and use the following command:

mysqldump -u <user> -p -h <host> <dbname> > /path/to/dump.sql

Then in the other server:

mysql -u <user> -p <dbname> < /path/to/dump.sql