How to create dump of MySQL database tablesUsing mysqldump command you can create dump of a complete MySQL database or a specific set of tables. Dump of whole MySQL database mysqldump --add-drop-table -h HOSTNAME -u root -p DATABASENAME > backup.sql Example: mysqldump --add-drop-table -h techgayan -u root -p dbtg > backup.sql This will prompt you for the root password and create a backup.sql file with your database. add-drop-table option tells mysqldump to create drop for every create statement in the backup file. Dump of some MySQL database tables mysqldump --add-drop-table -h HOSTNAME -u root -p DATABASENAME TABLE1 TABLE2 > backup.sql Example: mysqldump --add-drop-table -h techgayan -u root -p dbtg tbl1 tbl2> backup.sql
By: Java
1563 days ago
![]() Photos
No photo uploaded for this blog.
Featured Blogs![]() |