2

I'm migrating data from magento 1.7.0.2 to Magento 2 and get the following error:

MySQL server has gone away

enter image description here

  • Please check your MySQL "wait_timeout" variable to make sure MySQL is not closing the database connection early. – user35138 Jan 15 '16 at 17:40
3

I had the same problem and solved it by increasing the following value in the /etc/mysql/my.cnf mysql configuration file:

max_allowed_packet=4000M # just set it to 4000M because on my dev machine i don't care

Be carefull to not change the mysqldump option, there is also a max_allowed_packet

I also added this line to set the wait_timeout in the same configuration file:

wait_timeout=6000
  • 1
    Late to this party. Could you confirm with SELECT @@max_allowed_packet size is 4G? Most version documentation indicates the Range is up to 1G. Error log many indicate at startup a different max available. – Wilson Hauck Jul 4 '18 at 0:26
  • I can't confirm this. Maybe it just uses the max value from 1GB when setting it to a bigger value. But 1GB will be way enough anyways. – bpoiss Jul 4 '18 at 9:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.