Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • dfe
    replied
    It seems to be a Windows error, and not mySQL or VB.

    Herewith two documents dealing with it.

    http://support.microsoft.com/kb/256986/EN-US/
    http://dev.mysql.com/doc/refman/5.0/...n-windows.html

    "
    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.

    Leave a comment:


  • Steve Machol
    replied
    Please see this page for the causes of this error:

    http://www.vbulletin.com/docs/html/cantconnect

    Leave a comment:


  • KoSoVaR
    replied
    Originally posted by dfe View Post
    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

    Leave a comment:


  • dfe
    replied
    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.

    Leave a comment:


  • KoSoVaR
    replied
    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.

    Leave a comment:


  • dfe
    started a topic Can't connect to MySQL server on 'localhost' (10048)

    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
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X