980Exporting MySQL Databases with mysqldump

IMPORTANT: No space between -p and 'password'

  • -p prompts for the password
  • --verbose

Export a single Database

mysqldump -u'username' -p db_name > db_name.sql

Export all Databases

mysqldump -u'username' -p --all-databases > all.sql

Export a DB from Host

`mysqldump --verbose -h myhost -u'username' -p db_name > db_name.sqll

Export all Databases with Date

mysqldump -u'username' -p --all-databases > /path/all_date +\%Y\%m\%d_\%H\%M\%s.sql

`