gewei's profileSundayworkBlogListsNetwork Tools Help

Blog


    December 23

    Mysql一个郁闷无比的BT问题

    有个人用Mysql做服务器,客户端和服务器在同一台机器上的时候好好的,当服务器移到另一台机器上时,连接速度忽然变得奇慢无比,跟踪发现,每一次conn建立要四秒钟,原来是每次程序去连数据库的时候 数据库就会想去问dns反向解析一下客户端的域名 当然解析不到 超时4秒后就取消了 就是这个导致每次连接都要停4秒
    就像我跟一个人握手,我说:“你好!很高兴见到你,我是192.168.0.1。”那个人说:“你好啊!你等等,我得问问领导你是谁。”领导想了四秒钟后说:“我不知道,这个IP没登记过,你就拿IP称呼他吧。”然后那个人回来,说“好吧,192.168.0.1,下面我们来谈正事。”
    最无可忍受的是,我每次握手,他都要再去问一遍领导,领导总要煞有介事地想四秒钟,然后说:“我考虑了一下,我不知道他是谁。”
    *&%&^$(&%*^(*...

    解决的办法有两个 一是在mysql服务器的my.ini文件里[mysqld]段加入一行skip-name-resolve,但是重启之后发现mysql的管理工具localhost连不上了 二是在mysql所在服务器的hosts文件里加一个客户端的IP解析,让它知道对方是谁

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://sundaywork.spaces.live.com/blog/cns!2B215A9C3A07B54B!294.trak
    Weblogs that reference this entry
    • None