I have had a slight problem with my PHP/Mysql config for a little while now: The problem is this: When I place local host as my MYsql server in my scripts I get the following error:

Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)

This is because the mysql.sock is located @ /var/lib/mysql.sock

I then I have two options for my PHP script options with my current config

1) A TCP connectiion to mysqld: 127.0.0.1 - which is Very slow
2) A socket localhost:localhost:/var/lib/mysql/mysql.sock - which is messy

I am now going to upgrade PHP to the latest build fro 4.06 so can anyone definitively tell me what I need to do with my PHP install to rectify the above problem?

My PHP info is
http://cpfc.org/status/includes/phpinfo.php

My existing configure command is:

./configure --prefix=/usr/local/php --with-pgsql=/usr/include/pgsql --with-apxs=/usr/sbin/apxs --with-config-file-path=/usr/local/php --with-mysql --enable-track-vars --enable-debugger --enable-magic-quotes --with-zlib --with-pgsql=/usr/include/pgsql

Do I need to alter my configure command to read

./configure --prefix=/usr/local/php --with-pgsql=/usr/include/pgsql --with-apxs=/usr/sbin/apxs --with-config-file-path=/usr/local/php --with-mysql=/var/lib/mysql --enable-track-vars --enable-debugger --enable-magic-quotes --with-zlib --with-pgsql=/usr/include/pgsql

Thanks in advance for any thoughts

    try this..

    % /etc/rc.d/init.d/mysqld

    % ./mysqld stop

    % ./mysqld start

    paul

      Why would I want to stop and start mysqld? You have responded to the wrong thread I hope.

        Write a Reply...