title: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock in server
body: <p>Please help to solve this error</p>
  
  <blockquote>
    <p>PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in lock_may_be_available() (line 167 of /var/www/ambu0/data/www/ambu_new/includes/lock.inc).</p>
  </blockquote>
  
  <p>When I restart server, this error is comming </p>
  
  <blockquote>
    <p>[root@vm3547 etc]# cd rc.d/init.d [root@vm3547 init.d]# mysql restart ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)</p>
  </blockquote>