|
PDO_MYSQL connect fallback from localhost do /tmp/mysql.sock: msg#00018php.pecl.devel
Hi! I have a strange problem when connecting to a MySQL 4.0.24 server using PDO_MYSQL (from PHP 5.1.6). I tried the following code: <?php new PDO('mysql:host=localhost;dbname=test'); ?> And the error is: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' If I change the hostname to the external name: <?php new PDO('mysql:host=example.com;dbname=test'); ?> it works. In my.cnf "socket" is set to /var/run/mysqld/mysqld.sock, not /tmp/mysql.sock. There is no php.ini loaded, the precompiled mysql library from MySQL AB has been used. In phpinfo() the setting "MYSQL_SOCKET" from the old mysql extension says /tmp/mysql.sock! Do you have any idea what is going wrong here? Should I file a bug report? best regards Andreas |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ANNOUNCEMENT] Statgrab-0.6.0 (stable) Released.: 00018, PECL Announce |
|---|---|
| Next by Date: | Re: PDO_MYSQL connect fallback from localhost do /tmp/mysql.sock: 00018, Pierre |
| Previous by Thread: | [ANNOUNCEMENT] Statgrab-0.6.0 (stable) Released.i: 00018, PECL Announce |
| Next by Thread: | Re: PDO_MYSQL connect fallback from localhost do /tmp/mysql.sock: 00018, Pierre |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |