logo       

Re: PDO_MYSQL connect fallback from localhost do /tmp/mysql.sock: msg#00021

php.pecl.devel

Subject: Re: PDO_MYSQL connect fallback from localhost do /tmp/mysql.sock

Hello,

On 11/8/06, Andreas Korthaus <akorthaus@xxxxxx> wrote:
Pierre wrote:

> It is not a bug, update your php.ini

As said, there is no php.ini loaded (AFAIK). There is no php.ini at the
path phpinfo() shows.

Ah, I misread your post, so create it instead of updating it.

> or use:
>
> PDO("mysql:dbname=test;unix_socket=/var/run/mysqld/mysqld.sock");

I know that, but what I would like to know is why PDO_MYSQL does not
connect to the MySQL-Server using TCP/IP (localhost:3306), as I
specified, but instead uses a socket-adress which seems to be compiled
into the mysql library.

Use this syntax or add a valid php.ini. The mysql manual explains why
"localhost" uses socket and is not really a TCP/IP connection.

As there is no bug or mis behaviors, please consider to post further
questions in the php-db mailing list, merci :)

--Pierre



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise