mysqldump is a useful utility for dumping the contents of an entire database to an SQL file.
CODE:
-
mysqldump --user=dbusername --password=dbpassword db_name_here> db_name_here.sql
By default the --opt option is enabled, which is a shorthand option for specifying the below options. According to the documentation, using this option "... should give you a fast dump operation and produce a dump file that can be reloaded into a MySQL server quickly".
CODE:
-
--add-drop-table
-
--add-locks
-
--create-options
-
--disable-keys
-
--extended-insert
-
--lock-tables
-
--quick
-
--set-charset
