After running composer and then initiating craft setup I keep getting this error:

Username: [admin]
Email: abc@test.com
Site name: test
Site URL: test.com
Site language: [en-US]
Installing Craft...

Exception 'craft\errors\MigrationException' with message 'An error occurred while executing the "craft\migrations\Install migration: Error while sending QUERY packet. PID=25472'

in /vendor/craftcms/cms/src/db/MigrationManager.php:267

My MySQL version is 5.7.18-0ubuntu0.16.04.1.

  • Well, after trying a myriad of things, I ended up upping wait_timeout=10 to wait_timeout=100 & that did the trick. Also previously increased max_allowed_packet but that didnt seem to have an effect. Hope this helps someone.
    – Will
    Feb 2 '18 at 19:56
  • 1
    Would you mind adding that as an official answer instead of a comment, @Will?
    – Brad Bell
    Feb 2 '18 at 21:13

[SOLVED] By upping wait_timeout from 10 to 100 in my.cnf - seems to have fixed the issue.

Initial google searches for "Error while sending QUERY packet" led me to increase max_allowed_packet size, but this didn't fix the problem alone. Note, I'm not sure if both timeout and packet size need to be increased or just timeout nevertheless I have increased both and it works now.

Another side note on my server setup, the server I had problem with was a default Vesta CP ubuntu/mysql configuration. I had no problem installing Craft 3 on a different ubuntu 16 configured by Serverpilot.io.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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