Re: mysql_connect does not connect
| From: | Sam Hobbs | Date: | Tue, 14 Sep 2004 20:00:17 +0000 |
| Subject: | Re: mysql_connect does not connect | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196663@lists.php.net to get a copy of this message | ||
Note that there is a difference between the php_mysqli and the php_mysql
extensions. I have both php_mysqli.dll and php_mysql.dll in my PHP501\ext
directory, but I don't have the "extension=php_mysqli.dll" line in my
php.ini file. Is that something that should be in the php.ini (with a ";" to
comment it out) file for php 5.0.1?
I will try adding the "extension=php_mysqli.dll" line in my php.ini file
later when I have time. I did not try earlier since the commented version is
not in the php.ini file, either commented or uncommented.
"Chris Dowell" <php@nodalplane.com> wrote in message
news:41474935.6070702@nodalplane.com...
> 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.
>>
>>