ID: 10786 User Update by: [EMAIL PROTECTED] Old-Status: Feedback Status: Open Bug Type: MySQL related Operating system: Linux SuSE 7.1/Mandrake 7.2 PHP Version: 4.0.5 Description: localhost now fails in mysql_(p)connect Thanks for the quick reply. The error message was indicating that it couldn't find the mysql.sock file and your suggestion of pointing the entry in php.ini to that location fixed the problem immediately. The new location on one machine was /var/lib/mysql/mysql.sock - I don't have the correct permissions on the other machine to update php.ini as this is run by another company. Interestingly enough, I upgraded a third machine yesterday after your email arrived and this worked flawlessly - it was running RedHat 6.1/MySQL 3.23.27-beta and the mysql.sock was located in the expected place in /tmp. However, this still does not explain why previous versions of PHP can find the mysql.sock file without problem while 4.0.5 has trouble - I note that there has been quite a few changes to the ext/mysql/php_mysql.c file and suppose that something has been slightly broken there. Is this likely to be fixed? Thanks again Previous Comments: --------------------------------------------------------------------------- [2001-05-10 08:53:44] [EMAIL PROTECTED] What is the error message you get? Can you also try to set: mysql.default_socket to the location where you mysql soscket is? (Probably: /tmp/mysql.sock or /var/lib/mysql.sock). --------------------------------------------------------------------------- [2001-05-10 08:44:13] [EMAIL PROTECTED] Two systems have been upgraded from 4.0.4pl1 to 4.0.5 and both have then failed to connect to a MySQL database using 'localhost' in the mysql_connect or mysql_pconnect calls. The MySQL installation has not been upgraded. Replacing the libphp4.so with the 4.0.4pl1 version and restarting apache fixes the problem as does changing 'localhost' to '127.0.0.1' (plus a similar mod to mysql db and user tables in the database so that the host names match). The MySQL version is 3.23.32 --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=10786 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]