Encountered a need to import data table from the local MySQL to the server MySQL problem, in the online search, did not find that the operation is clear, many operations are using the command line to achieve, their own research, found that Navicat has its own import and export functions, It is easier to implement this feature.
target: Import dozens of tables from MySQL database A of machine A (itself database A has hundreds of tables) to the B machine's MySQL B database. (all of MySQL's operations are done in Navicat)
Step one: in MySQL on a machine to create a new database C, directly in the Navicat Ctrl-Select all the tables to be exported, right-click Copy, do not select Copy table, choose Copy, and then click on the new Database C table, the right should be empty, directly in the blank right-click Paste, All the tables prepared for export are copied to the new database C
Step two: Right-click in database c: Dump the SQL file and select the location you want to save, when you generate a. sql file that copies the. sql file to target machine B (U-disk or useful drop)
step three: in the target machine B MySQL (of course, NAVICAT) Select target database B, select the table, then right-click on the right margin, select "Run SQL File", and then select the copy of the. sql file, everything is OK
Finally can change the name of the table according to their own needs, in fact, the first step to create a new database is the main reason is that I do not export all the tables in the database, just need dozens of of the table, so you need to use a new database to copy the tables need to be stored separately, and so the import can be completed by the transfer database C
Navicat Chinese official website: www.formysql.com
Using navicat from MySQL guide to MySQL in another machine