1

Topic: PDO:: __ construct (): MySQL server has gone away

Kind time of days. Such error often takes off:
PDO:: __ construct (): MySQL server has gone away
Despite that that did all possible recommendations on the Internet.
That I have:
The version mysql:

mysql Ver 14.14 Distrib 5.7.20, for macos10.12 (x86_64) using EditLine wrapper

OS:

macOS High Sierra 10.13.2

Configuration/etc/my.cnf

[mysqld]
bind-address=localhost
# We disconnect determination of a domain name for IP addresses
skip-name-resolve
# The maximum quantity of connections
max_connections = 250
# We disconnect usage symbolic-links
symbolic-links = 0
# 
interactive_timeout = 60
wait_timeout = 600
max_allowed_packet = 128M
key_buffer_size = 256M
sort_buffer_size = 32M
sql-mode = ""

What can help?

2

Re: PDO:: __ construct (): MySQL server has gone away

Syrbek wrote:

That else can help?

Here the simple answer - to climb in PHP the code and to use ATTR_PERSISTENT => true .