Mysql dump quick and easy

Note Statistics

Note Statistics

  • Viewed 81 times
  • Bookmarked 1 times
Sat, 08/22/2020 - 22:58

DB Dump

Command

mysqldump -u [username] –p [password] [options] [database_name] [tablename] > [filename.sql]

Example:

mysqldump -u dbadmin -p   mydatabase > ./dump.sql

DB Restore

Command

mysql -u [username] -p [database_name] < [filename].sql

Example:

mysql -u dbadmin -p mydatabase < full-backup.sql
Authored by
Tags