Netshine Software Limited







Home arrow Developer Blog Make Text BiggerMake Text SmallerReset Text Size
Category >> mysql

Sep 25
2009

Can't connect to MySQL on 'localhost' and/or Couldn't fetch MySQLi

Posted by netshine in windows xpwindows registrywindowstcp/ipportmysqlimysqlmultiple connectionslocalhostdatabase

I was recently writing some code to migrate data from one database to another in small chunks (so that the progress could be reported to the browser using AJAX), but while developing on my Windows XP machine, I kept getting the above 2 error messages. This would occur only after a significant amount of data had already been processed successfully.

As the processing involved opening and closing connections to 2 different databases many times, it smelt like the connections were not being closed properly, but I double-checked everything and I was indeed explicitly closing all of the connections after use. Several frustrating hours later, I discovered the cause of the problem...

Joomla! Tutorial
Take a look at our free tutorial for Joomla! Administrator...


Login Form





Lost Password?

© 2004-2010 Netshine Software Limited   Terms and Conditions