MySQL 连接相关的几个超时设置:
connect_timeout, interactive_timeout, wait_timeout, net_read_timeout 和 net_write_timeout.

    "The symptom of hitting most of these limits is a "MySQL server has gone away" error or a "Lost connection to MySQL server during query" error. The exception is connect_timeout. If you hit this limit, you will get the error "Lost connection to MySQL server at 'reading authorization packet'". You could get a similar error when the slave I/O thread cannot connect to the master."

这三种错误信息都偶尔会见到,Lost connection to MySQL server at 'reading authorization packet' 见到的次数最少,是客户端连接MySQL认证时等待的时间超过了 connect_timeout (默认10秒),不管是哪种超时,当发生时都需要找到超时的原因是什么,而不是盲目地加大超时时间。

印象中比较典型的一次是,某个虚拟机网络IO负荷比较高,网络延时甚至高达100ms+,客户端始终无法连接到 MySQL,不断遇到 Lost connection to MySQL server at 'reading authorization packet' 错误,解决网络问题,超时问题自然就消失了