Sql MySql Dump Command for Dumping Data into a file

Mistakes to avoid when using MySQL dump command to dump data into a file


  1. Do not put mysql dump command inside a MySQL command prompt: Log in SSH and choose your folder you want to dump the data from the database then do; sudo mysqldump [databaseName] > [NameOfTheFileYouWantDataToBeDumpedIn].sql
  2. Vise-vesa if you want to restore the database with MySQL command in Ubuntu 18.04 MySql Client do; [In the Mysql Command Console] type show databased; (Database will  be shown), then type; use [DatabaseName]; and database will be changed. Then to restore the database, just type; source /var/www/(wherever you stored the sql dump file); (Make sure you include a (;))