Re: mysql_connect does not connect
| From: | Chris Dowell | Date: | Tue, 14 Sep 2004 19:40:37 +0000 |
| Subject: | Re: mysql_connect does not connect | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196650@lists.php.net to get a copy of this message | ||
Sam
Your problem probably does stem from the extension not being installed.
You say you're using (IIRC) mySQL 4.1
This requires you to use the mysqli extension, not the mysql extension
As you're on windows, it's probably just a case of uncommenting the
extension=php_mysqli.dll
line in your php.ini, but I'm not sure as I don't have much experience configuring PHP for windows.
Anyway - as far as I can tell from what you've said, that's likely to be your problem - your timeout is occurring because the mysql extension cannot connect, not because of any firewall issues.
From the manual entry on MySQL (http://www.php.net/mysql):
This MySQL extension doesn't support full functionality of MySQL versions greater than 4.1.0. For that, use MySQLi.If you then look at the entry for MySQLi (http://www.php.net/mysqli), you'll see this:
The mysqli extension allows you to access the functionality provided by MySQL 4.1 and above.Then this page (http://www.php.net/manual/en/install.windows.extensions.php) about installing extension on windows should get you the rest of the way. Cheers Chris Sam Hobbs wrote:
"Jason Davidson" <jdavidson@zworg.com> wrote in message news:496.1095142696@zworg.com...Also, a google on the error returns hundreds of results...... http://www.google.ca/search?hl=en&ie=UTF-8&q=Can%27t+connect+to+++MySQL+server+on+%27localhost%27+%2810061%29&btnG=Search&meta=Yes, I could have searched more first. And yes, that search does get an abundance of results. However I see no solutions relevant to my problem. Many of the solutions say things such as that the extension is not installed or that MySQL is not installed. Many (close to half I think) of the results are pages that have the error, so the abundance of results indicates it is a prevalent problem that is often not easily solved.