How to back up and restore a MYSQL database by command line

Here is how to back up and restore a MYSQL database by command line

Back up a MYSQL database:

Code: ——— mysqldump –opt -Q -u dwhs_dwhs -p dwhs_wrdprss*A* > /home/dwhs/workroom/dwhs_wrdprss1.sql ———

Restore a MYSQL database:

Code: ——— mysql -u dwhs_dwhs -p dwhs_wrdprss*B* < /home/dwhs/workroom/dwhs_wrdprss1.sql ———