Most Simple and Fastest Way to Backup and Restore a MySQL Database (mysqldump & mysql client)

How to mysqldump and mysql to backup and restore a database:

Backup to .sql file

 

Restore from .sql file

 

Suggested to run the command in database server to get the fastest speed.

 

References:

https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html