그러냐

ERROR 2006 (HY000): MySQL server has gone away Resolved 덤프 용량 에러 본문

mysql

ERROR 2006 (HY000): MySQL server has gone away Resolved 덤프 용량 에러

관절분리 2021. 12. 2. 15:11
반응형

Having problem importing your SQL dump, be it via command line or via container management console, here is the solution.

 

$ ./mysql -u root -p my_db < file.sql
Enter password: 
ERROR 2006 (HY000) at line 1: MySQL server has gone away

Error Message: ERROR 2006 (HY000): MySQL server has gone away, see above.

Description: This is caused by SQL import file being too big or field carrying too much information, causing it to exceed the max_allowed_packet setting.

System: Linux

Solution: increase the maximum allowed packet by changing the parameter in my.cnf file will resolve this problem.

Steps:

1. SSH or SFTP to the Server

2. Look for my.cnf with whereis command or

3. my.cnf can be found on linux: /etc/mysql

4. Add the following line to my.cnf

max_allowed_packet=64M

5. Save and close the file

6. Restart MySQL server using or Restart the Server

sudo service mysql restart

7. Try importing the SSL file again.

 

 

출처 : https://www.xelium.co.uk/2020/05/error-2006-hy000-mysql-server-has-gone-away-resolved/

반응형