[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 主站蜘蛛池模板: 玉龙| 洮南市| 三穗县| 宝清县| 华安县| 天气| 广安市| 德安县| 吴旗县| 衡阳县| 应城市| 甘洛县| 长白| 康平县| 行唐县| 平安县| 柳河县| 手游| 兴文县| 溧阳市| 观塘区| 神农架林区| 射阳县| 厦门市| 永平县| 油尖旺区| 达孜县| 土默特右旗| 龙州县| 黄梅县| 新丰县| 普陀区| 津南区| 剑川县| 于都县| 砚山县| 南华县| 都兰县| 宜良县| 土默特左旗| 嘉荫县|