问题描述
客户端远程连接服务器上的数据库服务,返回错误信息:Lost connection to MySQL server at 'waiting for initial communication packet', system error: 0
问题分析
服务器位于IDC机房,IDC内部设置有内部的DNS服务器对各应用服务器的IP做了反向解析,但未对内网IP做反向解析。
当mysql登录时,会对客户端IP进行DNS反查,导致连接丢失。
解决方案
在服务器上的数据库服务配置文件my.conf 文件中增加参数:skip-name-resolve