Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cloudlinux-suphp-mysql-connect-error [2015-01-18 10:39:27] (current)
shaun.reitan created
Line 1: Line 1:
 +====== MySQL Connect error (2) with suPHP on CloudLinux ======
  
 +Warning: mysql_connect() [function.mysql-connect]:​ Can't connect to local MySQL server through socket '/​var/​lib/​mysql/​mysql.sock'​ (2) in /​home/​user/​public_html/​index.php on line 3
 +
 +===== Possible Fix #1 =====
 +
 +The issue could be caused by cagefs. ​ Make sure the path <​c>/​var/​lib/​mysql</​c>​ exists on it's own line inside the <​c>/​etc/​cagefs/​cagefs.mp</​c>​ file.  Next, run <​c>​cagefsctl --remount-all</​c>​ and see if the issue is resolved.