Hello All,
I have successfully implemeted the chroot enviorment for the Apache, the webpages work fine without involving mysql. But when i run a mysql related webpage it gives me error
Not connected to MySql...Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Any fix for this issue?
chrooting apache troubles mysql
-
- Naik
- Posts: 68
- Joined: Thu Aug 07, 2008 6:09 pm
- Location: karachi
think about what "chroot" means. if apache is chrooted to /www (for example), the scripts will try to connect to /www/var/lib/mysql/mysql.sock. to the scripts, it will be /var/lib/mysql/mysql.sock.
configure mysql to use the new location for its socket, or configure your scripts (in php.ini, perhaps) to use tcp for db connections.
configure mysql to use the new location for its socket, or configure your scripts (in php.ini, perhaps) to use tcp for db connections.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
-
- Naik
- Posts: 68
- Joined: Thu Aug 07, 2008 6:09 pm
- Location: karachi