mySQL migrations
Export DB[top]
> mysqldump -u [user_name] -p[password] --database [database_name] >/tmp/databasename.sql
Export DB to a temporary file.
Specify the database administrator's user name, password, and the name of the database.
Import DB[top]
mysql> source /tmp/databasename.sql
OR
> mysql -u [user_name] -p[password] [database_name] < /tmp/databasename.sql
There are two ways to import a database.
One method is to login to the mysql server and import from there.
The other method is from the command line.
Tutorials






