mysql error.log显示
[Warning] Aborted connection 320935 to db: '...' user: '...' host: '...' (Got an error reading communication packets)
客户端得到的是:
Lost connection to MySQL server at 'reading initial communication packet', system error: 111
Lost connection to MySQL server at 'reading authorization packet', system error: 0
and after a while: Host '...' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
我读了关于这的mysql手册,以及许多其他线程。所以我在my.cnf中更改了一些值
max_allowed_packet = 512M
connect_timeout = 60
net_read_timeout = 120
innodb_buffer_pool_size = 5G
查看了断开连接的查询日志:
22400 Connect user@host on dbname
22400 Query SELECT @@sql_mode
22400 Query SET SESSION sql_mode=''
22400 Query SET NAMES utf8
22400 Init DB dbname
22400 Init DB dbname
检查表状态。bind-address是服务器IP,但我需要能够从外部连接。
Aborted_connects is 196
您可以检查两个主机之间的连接质量吗?基本100坪应该做..
—
2014年