MySQL external import data error [How to Solve]

Problem: export the database from the server to SQL and import the local database. Error code: 2006 – MySQL server is offline


(1) This problem is due to the default max of MySQL_allowed_Because the packet is too small, you can modify it larger

max_allowed_Packet = 100m
in addition, you can add two parameters to expand the corresponding time

(2) View the current configuration
show variables like ‘% max’_allowed_packet%’;

(3) Enter MySQL server and modify the configuration
set global Max on the MySQL command line_allowed_Packet = 2 * 1024 * 1024 * 10 (the parameter can be set larger)
then close the MySQL server link and enter
show VARIABLES like ‘%max_allowed_packet%’;
View Max_allowed_Is the packet edited successfully

(4) Import the data again to solve the problem


Similar Posts: