The MySQL is regularly going away for Magento 2 only. While working, if I refresh cache, then it shows gone.
I can login to the MySQL and do all the queries. It is working. Also, the local Magento 1 will work properly. Only the Magento 2 has a problem.
3 exception(s):
Exception #0 (Zend_Db_Adapter_Exception): SQLSTATE[HY000] [2006] MySQL server has gone away
Exception #1 (PDOException): SQLSTATE[HY000] [2006] MySQL server has gone away
Exception #2 (Exception): Warning: PDO::__construct(): MySQL server has gone away in /Library/WebServer/Documents/magento/store2/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php on line 129
Exception #0 (Zend_Db_Adapter_Exception): SQLSTATE[HY000] [2006] MySQL server has gone away
#0 /Library/WebServer/Documents/magento/store2/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /Library/WebServer/Documents/magento/store2/public_html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(340): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /Library/WebServer/Documents/magento/store2/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(460): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect()
#3 /Library/WebServer/Documents/magento/store2/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SHOW TABLES', Array)