Today, when importing a new database, there are 40 or so tables in it. Internet search a lot of information finally learned, but the network has a lot of information on the correctness of the actual operation to verify its authenticity!
Here is the dry goods:
(1) Create a new file on the desktop--main.sql (you can create a new TXT file and change the file suffix name to SQL).
(2) Open main.sql (through notepad++ Open, no words can go to the network to download a, of course, as long as the ability to open this file, and can edit it, with what software does not matter, I use the notepad++)
(3) After opening the Main.sql file, write the following in it:
/**
Note format
Source (space) SQL file path, path to write \ \, do not write \, and each statement remember to add the English semicolon ";"
When copying, this comment code can be used without copying
**/
SOURCE D:\\sql\\a.sql;source D:\\sql\\b.sql;source D:\\sql\\c.sql;
(4) After finishing, save. Then log in to the MySQL command window and run the following command in turn:
show databases;
Select your database
Use your database name;
File path address for source Main.sql
All right! Done! That's how I finished it!
。。。 MySQL batch import SQL file ...