[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 主站蜘蛛池模板: 博罗县| 平邑县| 柘城县| 云浮市| 青阳县| 西昌市| 凉城县| 象山县| 襄樊市| 聊城市| 沂南县| 同江市| 凭祥市| 周口市| 姜堰市| 绥德县| 新和县| 宁波市| 东方市| 和平区| 大理市| 土默特左旗| 宁蒗| 辽宁省| 和平县| 和政县| 临城县| 武邑县| 桐城市| 眉山市| 漳平市| 伊通| 噶尔县| 桑植县| 太仆寺旗| 新闻| 阿拉尔市| 渝北区| 蓝山县| 汉源县| 浦北县|