jm Posted July 17, 2007 Share Posted July 17, 2007 I just compiled php 5.2.3 and it's trying to connect to mysql with socket /tmp/mysql.sock But the actual socket is /var/run/mysqld/mysqld.sock (as set in my.cnf) . So my php apps (including phpmyadmin) can't find the socket I can temporarily fix this by putting a symlink in /tmp ... "ln –s /var/run/mysqld/mysqld.sock /tmp/mysql.sock" ... everything works until I reboot, then the symlink is deleted - because it's in the temporary directory. I think what I need to do is change the default socket php uses to /var/run/mysqld/mysqld.sock. I tried changing the setting in php.ini (both CLI and Apache2) to: mysql.default.socket = /var/run/mysqld/mysqld.sock But that didn't change anything. Phpinfo still showed: MYSQL_SOCKET = /tmp/mysql.sock Does anybody know what I'm missing. Help really appreciated. James ============ My environment: Ubuntu 6.10 (Edgy) php 5.2.3 (compiled myself: config options: --with-apxs2 --with-openssl=/usr/local/ssl --with-curl –-with-mysql –enable-sockets –enable-soap) mysql 5.0.45 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.