亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

遠程連接MySQL速度慢的解決辦法

系統 2184 0

skip-name-resolve

?

現象:

Windows 2003下的MySQL 5服務器,本機連接到MySQL服務非???,局域網內有兩臺Linux機器,有一臺連接很快,另外一臺輸入密碼后要等好幾秒鐘才能連上。

解決辦法:

在MySQL服務器的配置中增加一個如下配置后速度飛快。

[mysqld]
skip-name-resolve


附錄:( 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 --skip-name-resolve. In this case you can however only use IP names in the MySQL privilege tables.

If you have a very slow DNS and many hosts, you can get more performance by either disabling DNS lookop with --skip-name-resolve or by increasing the HOST_CACHE_SIZE define (default: 128) and recompile mysqld.

You can disable the hostname cache with --skip-host-cache. You can clear the hostname cache with FLUSH HOSTS or mysqladmin flush-hosts.

If you don't want to allow connections over TCP/IP, you can do this by starting mysqld with --skip-networking

遠程連接MySQL速度慢的解決辦法


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦?。?!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 精品色视频 | 成人影院一区二区三区 | 日本久久中文字幕精品 | 日本爱爱片 | 亚洲一区二区免费视频 | 国产国产成人人免费影院 | 99热久久国产精品这里有全部 | 99热热久久 | 国产夜色 | 老司机午夜性大片免费 | 久久久久久久九九九九 | 久热免费在线观看 | 国产99视频精品草莓免视看 | 亚洲色欧美 | 欧美一级精品高清在线观看 | 日韩中文字幕精品久久 | 国语性猛交xxxx乱大交 | 欧美亚洲日本国产综合网 | 亚洲综合干 | 久久99热久久精品在线6 | 亚洲一区二区三区高清网 | 第一福利在线观看 | 视频在线观看一区 | 亚洲欧美日韩一区超高清 | 日韩一区二区三区在线免费观看 | 香蕉网站狼人久久五月亭亭 | 韩国 欧美 日产 国产精品 | 中国男女全黄大片一级 | 亚洲色视频 | 亚洲精品不卡 | 午夜精品久久久久久久99热浪潮 | 久久精品女人毛片国产 | 日韩中文字幕精品视频在线 | 国产在线精品一区二区中文 | 免费观看a毛片一区二区不卡 | 日韩精品亚洲一级在线观看 | 国产综合成色在线视频 | 四虎成人欧美精品在永久在线 | 台湾亚洲精品一区二区tv | 国产成人精品视频播放 | 波多野结衣免费一区二区三区香蕉 |