Find the my. ini file in the mysql installation directory and add the following code:
Interactive_timeout = 120
Wait_timeout = 120
Max_allowed_packet = 32 M
==============================================
Small Example
The mytest_emp_dept. SQL file contains the following content:
Create table emp (eid int primary key AUTO_INCREMENT, ename VARCHAR (20) not null, esex VARCHAR (10), deptid int not null );
Create table dept (deptid int primary key AUTO_INCREMENT, dname VARCHAR (20) not null, daddress VARCHAR (200 ));
Insert into emp (ename, esex, deptid) VALUES ('chris ', 'M', 1), ('edge', 'M', 1), ('Kelly ', 'w', 2), ('maryse', 'w', 2 );
Insert into dept (dname, daddress) VALUES ('development', 'beijing'), ('account', 'shanghai ');
SELECT ename, esex, dname, daddress FROM emp, dept WHERE emp. deptid = dept. deptid order by ename;
==============================================
The command line for importing SQL statements is as follows:
Source "pathname" +/mytest_emp_dept. SQL
==============================================
The effect is as follows: