Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lara131141's avatar

Solved: MySQL server has gone away after upgrading php 7.4 (Valet)

I just upgraded my Valet installation with homebrew to php 7.4. PHP is working fine but suddenly my Laravel log shows this 'MySQL server has gone away' error.

See below the solution that worked for me.

0 likes
6 replies
bugsysha's avatar

I was thinking in new comment and then you can select it as best answer.

lara131141's avatar
lara131141
OP
Best Answer
Level 1

My quick solution was to edit my.cnf:

nano /usr/local/etc/my.cnf

Add this line:

default-authentication-plugin=mysql_native_password

Save the file and restart MySql with:

brew services restart mysql
5 likes

Please or to participate in this conversation.