Document directory
- Mysqldump-u use the primary name-P password to name the database table> *. SQL
Mysqldump-u use the primary name-P password to name the database table> *. SQL
1. Export all table structures of the database. mysqldump-uuser-ppasswd Database Name> data. SQL; // (data. SQL is the generated SQL script) 2. Export the structure of a table in the database mysqldump-uroot-ppasswd database name Table Name> data. SQL; 3. Import a database table mysql-uroot-ppasswd database name <data. SQL
-- Add-drop-Table option will add the drop table if exists statement before each table. This ensures that errors will not occur when importing data back to the MySQL database, check whether the table exists. If yes, delete the -- add-locks option and bind a lock table and unlock TABLE statement to the insert statement. This prevents other users from operating the-C or-complete_insert option on the table when these records are re-imported to the database, so that the mysqldump command adds the column (field) name to each insert statement. This option is useful when exporting data to another database. -- Delayed-insert: add the delay option-f or-flush-logs to the INSERT command to use this option. The log of the MySQL server will be refreshed before the export is executed. -f or-force uses this option, even if an error occurs, continue to export the -- full option and add the additional information to the create table statement-l or-lock-tables. The server will lock the table when exporting the table. The-T or-no-create-Info option makes the mysqldump command do not create the create table statement. This option is convenient when you only need data and do not need DDL statements. -D or-no-Data: The mysqldump command does not create an insert statement.
Reference: http://www.duote.com/tech/5/12180.html? PID = 3 & ptid = 0 & tid = 3 # pjhash