Can't connect to MySQL server on 'localhost' (10048)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dfe
    Member
    • Sep 2006
    • 55

    Can't connect to MySQL server on 'localhost' (10048)

    Hi

    I am getting these errors on the forum, but on the same server I am running MS SQL with over 100 sites connecting to it without a problem.

    Is there anything I can check?


    Database error in vBulletin:

    mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to MySQL server on 'localhost' (10048)
    ....\forum\includes\class_core.php on line 273

    MySQL Error :
    Error Number :
    Date : Friday, November 24th 2006 @ 06:43:12 AM
    Script :
    http://www.4x4community.co.za/forum/search.php?searchid=16894
    Referrer :
    http://www.4x4community.co.za/forum/showthread.php?t=6673
    IP Address : 000
    Username :
    Classname : vB_Database
  • KoSoVaR
    New Member
    • Sep 2006
    • 23
    • 3.6.x

    #2
    Hello,

    Did you just switch hosts? I'm not sure if the 10048 is a port number or if it's the error number. If it is the port number, and you used 10048 at your old host, 3306 is the DEFAULT MySQL port. It's in includes/config.php

    $config['MasterServer']['servername'] = 'localhost';
    $config['MasterServer']['port'] = 3306;

    If it says $config['MasterServer']['port'] = 10048; on the line, might want to change it to 3306.

    Hope this helped a tad.

    Comment

    • dfe
      Member
      • Sep 2006
      • 55

      #3
      The 10048 is the error no, not tcp port. mySQL running on standard port.
      The site is fully operational, just every now and again I get a whole batch of errors.

      Comment

      • KoSoVaR
        New Member
        • Sep 2006
        • 23
        • 3.6.x

        #4
        Originally posted by dfe
        The 10048 is the error no, not tcp port. mySQL running on standard port.
        The site is fully operational, just every now and again I get a whole batch of errors.
        Seems like 10048 is a global error number.

        "A bind failure occurs when two gateways try to listen on the same network port. Check the gateway configuration files for a conflicting network service name or port number."

        So I don't know if that is clients spoofing IPs or if it's server side. If it happens once in awhile but you get a lot of error e-mails, maybe it's clients spoofing?

        Sorry if I'm not helping

        Comment

        • Steve Machol
          Former Customer Support Manager
          • Jul 2000
          • 154488

          #5
          Please see this page for the causes of this error:

          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
          Change CKEditor Colors to Match Style (for 4.1.4 and above)

          Steve Machol Photography


          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


          Comment

          • dfe
            Member
            • Sep 2006
            • 55

            #6
            It seems to be a Windows error, and not mySQL or VB.

            Herewith two documents dealing with it.

            Describes the Windows registry and provides information about how to edit it.



            "
            When you're running a MySQL server on Windows with many TCP/IP connections to it, and you're experiencing that quite often your clients get a Can't connect to MySQL server error, the reason might be that Windows doesn't allow for enough ephemeral (short-lived) ports to serve those connections.
            By default, Windows allows 5000 ephemeral (short-lived) TCP ports to the user. After any port is closed it will remain in a TIME_WAIT status for 120 seconds. This status allows the connection to be reused at a much lower cost than reinitializing a brand new connection. However, the port will not be available again until this time expires.
            With a small stack of available TCP ports (5000) and a high number of TCP ports being open and closed over a short period of time along with the TIME_WAIT status you have a good chance for running out of ports. There are two ways to address this problem:
            • Reduce the number of TCP ports consumed quickly by investigating connection pooling or persistent connections where possible
            • Tune some settings in the Windows registry (see below) "
            Last edited by dfe; Mon 27 Nov '06, 9:55pm.

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...