How to Export MySQL Tables to SQL Files Using mysqldump

Export the data and structure of the cj_dy_withdraw_detail table from a specific database (replace the database name and table name with your own):

mysqldump database -h 127.0.0.1 -u username -p –table cj_dy_withdraw_detail  >./cj_dy_withdraw_detail.sql

Export the structure of a specified table:

mysqldump -d database -h 127.0.0.1 -u username -p –table cj_dy_withdraw_detail  >./cj_dy_withdraw_detail.sql

Export all data and structures from a specified database:

mysqldump database -h 127.0.0.1 -u username -p   >./cj_dy_withdraw_detail.sql

Leave a Comment

Your email address will not be published.