Mysql Data Export and Import: Reference article: MySQL Data Import Export Method and Tool Introduction http://blog.9cbs.net/davidullua/archive/2004/04/26/21980.aspx http://blog.9cbs.net/ Davidullua / Archive / 2004/04/26 / 21981.aspx http://blog.9cbs.net/davidullua/archive/2004/04/26/21982.aspx main tools: mysqldump.exe, mysqlimport.exe and mysql.exe The three are in the mysql / bin directory. Mysqlcc.exe Additional Installation (1) Export 1, Structure Export (1) In MySQLCC, select a table or Tables, press Shift or mouse zip, select "Tool / Show Create". You have to export the table (can be selected, Ctrl a all) Click Execute below the form. You can generate a SQL file of the selected table structure. Open the SQL query window and stick to the SQL script generated above. All table structures can be generated in the new location.
(2) MYSQLDUMP.EXE specific parameters, you can view - Hostname -u username -p password - ADD-DROP-TABLE This option will be added to the Drop Table if Exists statement in front of each table This will not be wrong when the Mysql database is guided, because each time is returned, will first check if the table exists, and the existence is deleted - ADD-LOCKS This option will be bundled on the Insert statement on a Lock Table and UNLOCK TABLE statement. This prevents the operation of other users on the table when these records are again imported into the database.
-c or - complete_insert This option makes mySQLDUMP commands to each generated an Insert statement to add (Field) name. This option is useful when you export the data.
-f or -force uses this option, even if there is an error, continue to export
-l or -lock-tables Use this option to export the server, the server will lock the table. -T or -no-create- info This option makes the mysqldump command not to create a CREATE TABLE statement. This option is convenient when you only need data without a DDL (database definition statement).
-d or-dia-data This option makes the mysqldump command does not create an Insert statement. This option can be used when you only need DDL statements.
-T path or -tab = path This option will create two files, one file contains DDL statements or table creation statements, and another file contains data. The DDL file is named Table_Name.sql, and the data file is named Table_name.txt. The path name is the directory where these two files are stored. The directory must already exist, and the user has the privilege of the file.
-w "where clause" or -where = "where clause" can use this option to filter the data that will be placed in the export file. (3) Mysql.exe uses the Select Into Outfile syntax to export data to an external file. Specific grammar is slightly. (2) Import 1, structure (1) mysqlcc Open the SQL query window and stick into the SQL script generated above. All table structures can be generated in the new location. (2) MySQLIMPORT can be used to load data (3) mysql.exe bin / mysql -p
Or open a CMD window, type mysql