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 165

What does this error mean?

Posted by amnesia623 on February 8, 2011 at 6:53pm

I get this error whenI go to my drupal 7 site:

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 165 of /home/xxxxxxxx/public_html/includes/lock.inc)…

Too many connections? How do I fix this?

Thanks

Login or register to post comments ⋅ Categories: ,

Comments

 

In Sites/default/settings.php

Posted by Technonow on February 21, 2011 at 5:11pm

In Sites/default/settings.php try changing ‘localhost’ to ’127.0.0.1′

It’s easier for the programme to find the numbers than the words.

Not sure why, but it does work.

 

Server Security Related articles

 

Major IP Addresses Blocks By Country

Stop Traffic From China IP Address Blocks To Protect Your Web Server From Chinese Hackers

20 Linux Server Hardening Security Tips

How do I know if my Linux server has been hacked?

Setup SSH to run on a non-standard port

HowTo: Install Adobe Flash Player on CentOS 6.2

Install Apache, MySQL 5.5.30 & PHP 5.4.12 on RHEL/CentOS 6.4/5.9 & Fedora 18-12

Linux Firewalls Using iptables

Protected: Cpanel Resource Monitor

AWS Free Usage Tier

esxi where are snapshots stored

CentOS] How to tell if I’ve been hacked?

Install Skype 4.1/4.0 on Fedora 18/17, CentOS/RHEL/SL 6.3

How To Configure a Comcast Business Class Static IP Address

what is VPS hosting

ConfigServer Security & Firewall : CSF

Securing OpenSSH

psad: Intrusion Detection and Log Analysis with iptables

What is port scan attack

Moving or copying a virtual machine within a VMware environment (1000936)

vSphere 5.1 Complete install and client – How to Install and Configure VMware

what is distributed denial-of-service attack (DDoS)?

How to Login as a Different User in Linux

Parallels Plesk Panel – Summit 2013 – Birger Steen Keynote

How to transfer my osCommerce from one host to another?

7 Chmod Command Examples for Beginners

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 165

CageFS is a virtualized file system and a set of tools to contain each user in its own ‘cage’.

Checking what PHP version I’m running on Linux?

what can you do with vmware esxi

WHM/Cpanel in Amazon EC2 server

EC2 CPU benchmark

How to Install wget on CentOS 6.2

How to Install zPanel on CentOS 6

Amazon EC2 micro instance type

2013 AWS Summit Keynote — San Francisco

Building a Home Virtual Host Server

How to Build a Supercomputer

Using Apache Bench for Simple Load Testing

CPU Usage HIGH – spamd child?

What is Mod_Security

Turn Windows Firewall on or off

How to Configure Your Mac’s Firewall

HOW TO UNBLOCK IP ADDRESS IN CSF FIREWALL FROM CPANEL/WHM

How to Install dig on a CentOS Linux Server

How to change hostname of a CentOS system?

Install Linux Rkhunter (Rootkit Hunter) in RHEL, CentOS and Fedora

cPanel Server Service Package – ConfigServer Services

(1938)

Share

visitors counter: since Sep 4th, 2012