[mysqld]
skip-name-resolve
在linux下配置文件是/etc/my.cnf,在windows下配置文件是mysql安裝目錄下的my.ini文件。注意該配置是加在 [mysqld]下面,在更改配置并保存后,然后重啟mysql并遠程連接測試,一切恢復如初。該參數的官方解釋信息如下:
How MySQL uses DNS
When a new thread connects to mysqld, mysqld will spawn a new thread to handle the request. This thread will first check if the hostname is in the hostname cache. If not the thread will call gethostbyaddr_r() and gethostbyname_r() to resolve the hostname.
If the operating system doesn't support the above thread-safe calls, the thread will lock a mutex and call gethostbyaddr() and gethostbyname() instead. Note that in this case no other thread can resolve other hostnames that is not in the hostname cache until the first thread is ready.
You can disable DNS host lookup by starting mysqld with 主站蜘蛛池模板: 阿勒泰市| 宁陵县| 工布江达县| 云梦县| 敖汉旗| 修武县| 宜川县| 桂阳县| 思南县| 滁州市| 新晃| 黄浦区| 济宁市| 凭祥市| 行唐县| 封丘县| 武山县| 招远市| 怀集县| 剑阁县| 红河县| 广水市| 靖西县| 濮阳市| 司法| 万源市| 文昌市| 西青区| 马龙县| 莱阳市| 三原县| 象山县| 华池县| 胶南市| 万山特区| 金秀| 仁布县| 海南省| 永登县| 吴川市| 杭州市|