I tried to import a large sql file through phpMyAdmin...But it kept showing error
'MySql server has gone away'
What to do?
I tried to import a large sql file through phpMyAdmin...But it kept showing error
'MySql server has gone away'
What to do?
I solved my issue with this short /etc/mysql/my.cnf file :
I updated "max_allowed_packet" to 1024M, but it still wasn't working. It turns out my deployment script was running:
Be sure to explicitly specify a bigger number from the command line if you are donig it this way.
I had similar error today when duplicating database (MySQL server has gone away...), but when I tried to restart mysql.server restart I got error
This is how I solved it: I opened up Applications/Utilities/ and ran Activity Monitor
then was able to solve the error problem with
For me this solution didn't work out so I executed
in my SQL client.
If not able to change this with MYSql service running, you should stop the service and change the variable in "my.ini" file.
For example:
I had this error and other related ones, when I imported at 16 GB SQL file. For me, editing my.ini and setting the following (based on several different posts) in the [mysqld] section:
If you are running under Windows, go to the control panel, services, and look at the details for MySQL and you will see where my.ini is. Then after you edit and save my.ini, restart the mysql service (or restart the computer).
If you are using HeidiSQL, you can also set some or all of these using that.
Make sure mysqld process does not restart because of service managers like systemd.
I had this problem in vagrant with centos 7. Configuration tweaks didn't help. Turned out it was systemd which killed mysqld service every time when it took too much memory.