MySQL Database export
Log in as root to the VPS and execute the following command to export.
1./usr/local/mysql/bin/mysqldump-u root-p123456 Zhumaohai >/home/backup/zhumaohai.sql
If all data sources are exported, the statement is:
2./usr/local/mysql/bin/mysqldump-u root-p123456--all-databases >/home/backup/all.sql
Where: root is the database user name
123456 password for the corresponding root database
Zhumaohai is the name of the database that needs to be exported.
/home/backup/zhumaohai.sql is the path to the database file SQL export.
MySQL Database import
Log in as root to the VPS and execute the following command to import.
1./usr/local/mysql/bin/mysql-u root-p123456 zhumaohai
Import all databases:
2./usr/local/mysql/bin/mysql-u root-p123456
3. Import using the source command, followed by a script file (as used here. sql) Mysql>source D:/wcnc_db.sql
MySQL Export Import