PHP Problems with Mysql
Hi
I just installed PHP and Mysql with apache as usual, I have a problem Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) origiinally my mysql.sock was in /tmp so i created a symbolic link to /var/lib/mysql and still the same error. I've tried everything and the sock file is definately there, but php can't get a connection from it. I try running the mysql client program using the --socket option and that works through either socket so the socket definatley points to the connection. Does anyone know why this wouldn't work through php when it works through the command line client. PHP is recognising the mysql commands, but just not connecting. I tried changing the permissions on the file and directory, still no luck. Anyone got any suggestions would be really appreciates thanks Matt Johnson |
So you do have the MySQL section of you phpinfo() page?? If you're not getting that.. than you need to edit your PHP config for MySQL..
|
I do have a mysql section:
MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 3.23.58 MYSQL_MODULE_TYPE external MYSQL_SOCKET /var/lib/mysql/mysql.sock MYSQL_INCLUDE -I/usr/include/mysql MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient that looks ok, anyone see anything funny? |
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.
http://www.linuxquestions.org/rules.php http://www.linuxquestions.org/questi...01#post1309701 This your original post, this one is being closed. |
All times are GMT -5. The time now is 02:00 PM. |