Problems connecting to mysql using phpMyAdmin
Ali A Samii
samii at me.com
Fri Nov 19 00:33:19 PST 2010
Perfect, thank you.
I restarted apache2 and mysql and it's working perfectly, unless I get to another hiccup.
Thank you
On 19 Nov, 2010, at 09:24 , Ryan Schmidt wrote:
> Ok, so in both cases, PHP is looking for the MySQL socket in /tmp/mysql.sock. That is not the default location for the MySQL socket; you should edit your php.ini and tell it where the MySQL socket actually is. When you installed the php5-mysql port it should have printed this message for you:
>
>
> To use mysqlnd with a local MySQL server, edit /opt/local/etc/php5/php.ini and set
> mysql.default_socket, mysqli.default_socket and pdo_mysql.default_socket
> to /opt/local/var/run/mysql5/mysqld.sock
>
>
>
>
>
> On Nov 19, 2010, at 02:17, Ali A Samii wrote:
>
>> Well, from the browser, I got the following when I ran the phptest.php
>>
>>
>> ( ! ) Warning: mysql_connect() [function.mysql-connect]: [2002] No such file or directory (trying to connect via unix:///tmp/mysql.sock) in /Volumes/External_Storage/www/phptest.php on line 2
>
>> and from the command line, the result was:
>>
>> Alis-iMac:www ali$ php phptest.php
>> PHP Warning: mysql_connect(): [2002] No such file or directory (trying to connect via unix:///tmp/mysql.sock) in /Volumes/External_Storage/www/phptest.php on line 2
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2659 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20101119/7b54361c/attachment.bin>
More information about the macports-users
mailing list