Search code examples
mysqldrupaldrupal-7

Drupal Error PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL


When i try to access to the content administrator drupal show me the error.

PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in lock_may_be_available() (line 167 of /home/..../public_html/page/includes/lock.inc).

I check the Disk Space, if the mysql engine is up. any one know to fix that bug.

I read so many post and only say me that error is beacouse the DB is goes to the hell, jajaja. but i dont know if exist other way to repair the db without truncate it


Solution

  • I found the error and this happens because the client does not pay for the hosting, the hosting turn off the mysql service, when he pay the hosting, the hosting turn on the service.