Mysql Connection Error 10048
Read Home Forum vBulletin Legacy Versions & Products Legacy vBulletin Versions vBulletin 3.6 Questions, Problems and Troubleshooting Join us on Facebook, Twitter and YouTube. This section is an archive with no posting allowed. The software represented in this forum is no longer supported or updated. If you need help upgrading to a newer version of vBulletin please open a support ticket. You can also post in the section supporting the upgrade version you're planning to use. We are sorry for any inconvenience this may cause. Welcome to the vBulletin support forums! In the forums you can receive professional support and assistance with any issues you might have with your vBulletin Products. If you are having problems posting in the relevant areas for your software, please see this topic. Announcement Collapse No announcement yet. Can't connect to MySQL server on 'localhost' (10048) Collapse X Collapse Posts Latest Activity Search Page of 1 Filter Time All Time Today Last Week Last Month Show All Discussions only Photos only Videos only Links only Polls only Filtered by: Clear All new posts Previous Next dfe Member Join Date: Sep 2006 Posts: 55 #1 Can't connect to MySQL server on 'localhost' (10048) Thu 23rd Nov '06, 7:57pm 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() [function.mysql-connect]: 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 Tags: None KoSoVaR New Member Join Date: Sep 2006 Posts: 23 #2 Thu 23rd Nov '06, 10:30pm 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. Comme
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > mysql error 10048 - how do we solve it Want to Advertise Here? Solved mysql error 10048 - how do we solve it Posted on 2008-09-26 MySQL Server 1 Verified Solution 20 Comments 1,951 Views Last Modified: 2008-12-06 mysql 10048 , how do we solve that error . what is http://www.vbulletin.com/forum/forum/vbulletin-legacy-versions-products/legacy-vbulletin-versions/vbulletin-3-6-questions-problems-and-troubleshooting/215119-can-t-connect-to-mysql-server-on-localhost-10048 the cause of this error 0 Question by:nabil_zakkak Facebook Twitter LinkedIn Google LVL 1 Best Solution byedcharleslynn We found the problem to be a windows issue. We resolved it by changing the maxuserports registry setting. It's documented in the mysql docs and worked like a charm for us on Windows 2003 Server. Ps. Go to Solution 18 Comments LVL 5 Overall: Level 5 MySQL Server 1 Message Expert Comment by:vibrazy2008-09-26 Hi, I have https://www.experts-exchange.com/questions/23765797/mysql-error-10048-how-do-we-solve-it.html found this in expert exchange. http://www.experts-exchange.com/Database/MySQL/Q_23215173.html 0 LVL 21 Overall: Level 21 MySQL Server 19 Message Active 4 days ago Expert Comment by:theGhost_k82008-09-26 You'r trying to access you mysql server from network and there may be some entries to my.cnf for restricting remote access. check mysql for : 1) skip-networking 2) bind-address=127.0.0.1 If any of that/they'r there remove//comment it. And restart mysql. May be firewall is stopping you to connect. 0 Message Author Comment by:nabil_zakkak2008-10-19 The problem is nothign to do with the server or mysql the problem when I have too many load on the database the database will refuse connection for 1 or 2 minutes and then will accept the connections. So the main problem is when the server is busy. Any suggestion 0 LVL 1 Overall: Level 1 MySQL Server 1 Message Expert Comment by:edcharleslynn2008-10-20 Found this on the net, it seems to offer a solution to the issue.: "The error is caused not by MySQL or the MySQL ODBC driver, but by the behaviour of Windows. For performance reasons Windows maintains a connection on a TCP port after it is closed for (by default) 4 minutes. The advantage of this is that if the connection needs to be reopened it can be done at a lower cost. The trouble is that
Reporter: p t Email Updates: Status: Closed Impact on me: None Category:MySQL Server Severity:S1 (Critical) Version:MySql 4.0.24 OS:Microsoft Windows (XP SP2) Assigned to: View Add Comment Files Developer Edit Submission View Progress Log Contributions [10 May 2005 6:33] p t https://bugs.mysql.com/bug.php?id=10498 Description: The problem only occurs on Windows XP and 2003, but works fine on Windows 2000. http://www.cryer.co.uk/brian/mysql/trouble_odbc_cant_connect_on_localhost.htm We have tried using MySql Connector .NET 1.0.4, MySqlDriverCS and MYODBC 3.51, but none of them have resolved the problem. The Problem: The ASP.NET and Windows applications run fine at the start but after a while when too many queries are made it refuses to connect to mysql and MySql connector .NET gives me the following error "Unable to connect to any of the mysql connection specified MySQL hosts". When this happens, if I try to login manually to mysql it says: "ERROR 2003: Can't connect to MySQL server on 'localhost' (10048)". After I leave it idle for a while it goes back to running fine but then crashes again when too much load is put on. Like I said at the start this is only an issue with Win XP and Win 2003, but not Win 2000. How to repeat: If using MySql Connector .NET, mysql connection error try the following code to connect to MySql public DataSet SelectQuery(string sql) { MySqlConnection conn = new MySqlConnection(); DataSet dset1 = new DataSet(); DataTable dtab1 = new DataTable(); MySqlDataAdapter da = new MySqlDataAdapter(); string connStr = "server=localhost;user id= USERNAME; password= PASSWORD; database=DotnetDB; pooling=false"; try { conn = new MySqlConnection(connStr); conn.Open(); da = new MySqlDataAdapter(sql,conn); conn.Close(); da.Fill(dset1); return dset1; } catch (MySqlException ex) { string temp = ex.ToString(); conn.Close(); return null; } } And then set up an infinite loop that calls the above function with a basic sql statement "Select * from DotnetDB" You must let it run for a while (say 50 seconds). Suggested fix: Unsure of the exact problem to offer any possible fix. [10 May 2005 6:35] p t I have also tried MySql 5.0 and still had the same problem [21 May 2005 5:04] Miguel Solorzano Please read the bug: http://bugs.mysql.com/bug.php?id=6580 then you will notice that isn't a MySQL issue. Thanks in advance. [21 Jun 2005 23:00] Bugs System No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [18 Jul 2005 8:24] p t I have added the TcpTimewaitDelay key as suggested by microsoft and set it to 30 seconds but I am still having the same problem. [19 Jul 2005 7:49]
ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'localhost' (10048) The precise presentation of this error may vary according to the software used, this wording was generated from an ASP.NET application. Other symptoms: The application has previously been able to successfully connect to the database. Waiting a minute or so, and the application can connect again without the error. The error seems to manifest itself under "stress" conditions, when lots of connections are being made opened and closed in a short space of time (minutes). These notes only apply to the error above when the "other symptoms" are present. Cause The error is caused not by MySQL or the MySQL ODBC driver, but by the behaviour of Windows. For performance reasons Windows maintains a connection on a TCP port after it is closed for (by default) 4 minutes. The advantage of this is that if the connection needs to be reopened it can be done at a lower cost. The trouble is that under heavy load when lots of connections are opened and closed to the database, the system can hit a limit on the maximum number of connections allowed (even though as far as the application is concerned these connections have been closed). Resolution To decrease the delay before Windows releases an open TCP connection, use regedit to edit the following registry value of: HKLM\ SYSTEM\ CurrentControLSet\ Services\ Tcpip\ Parameters\ TcpTimedWaitDelay This value does not exist by default and will need to be created. It should be a DWORD. The valid range is 0x1E - 0x12C (30seconds to 300 seconds), the default is 0xF0 (240 seconds). Decreasing the value of TcpTimedWaitDelay should help, but is unlikely to permanently solve the problem for a busy system (because if the system is busy the limits will still be hit). Consider whether it is possible to modify the application to re-use database connections instead of closing and reopening them. In theory enabling connection pooling would address this problem. For more information about connection pooling see http://support.microsoft.com/default.aspx?scid=kb;EN-US;q169470. To enable connection pooling for the MySQL driver: Start > Control Panel > Administrative Tools > Data Sources (ODBC). This will open up the "ODBC Data Source Administrator". On the "Connection Pooling" tab, double click the ODBC Driver you are using to connect