MySQLdump export sql script

1. Problem description

  Through the graphical tool, use the select statement in the query window to query the required results according to the conditions, and then use the "Export Wizard" to export the query results into a sql file, but the exported sql statement is incomplete, and there is no table name or field name.

  

  Through the graphical tool, I tried many times to no avail, and then used MySQLdump

2. Export the insert sql script file through MySQLdump

# mysql exports insert sql script data with fields 
# mysqldump -u username -p password -h database host ip -P port number --skip-extended-insert --complete-insert database name table name -t -c --where ="Condition">~/test.sql           
            --skip-extended- insert line-by-line export
             - t will not generate create table and drop table statements
             - c generate a complete insert statement (distinguishing field)
             --where splicing condition , only export data that meets the conditions

3. MySQLdump parameters are detailed, refer to:

# mysqldump --help

 

  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325296876&siteId=291194637
Recommended