I updated my local PHP to 7.4 with homebrew but with this PHP 7.4, Laravel 6.6 cannot be used to connect to MySQL. I even tried with fresh laravel project and it cannot connect to MySQL.
MySQL is also installed using homebrew and it is working fine. I can access MySQL from command line and other GUI.
The .env file of Laravel is properly confirgure. When i switch back PHP to 7.3 all my local projects are working back to normal including any fresh projects created.
The error was:
PDOException: SQLSTATE[HY000]  MySQL server has gone away
Anybody else facing the same problem? Could somebody help...