have transferred a Drupal multi-site configuration to a new server with the intent to separate the two websites into individual Drupal installations.

I receive the following error from Drupal:

PDOException: SQLSTATE[HY000] [2002] Invalid argument in lock_may_be_available() (line 167 of /home/designglassco/public_html/drupal/includes/lock.inc).

Most of the internet seems to point to a database issue but I have triple checked this information and all is fine.

$databases = array (
  'default' => 
  array (
    'default' => 
    array (
      'database' => 'DB_NAME',
      'username' => 'DB_USER',
      'password' => 'DB_PASSWORD',
      'host' => 'localhost',
      'port' => '',
      'unix_socket' => '',
      'driver' => 'mysql',
      'prefix' => '',

I tried both localhost and

I am using Drupal 7.34, PHP 5.4.27, and MySQL 5.5.40.

Does anyone know how to fix this?

  • What version of Drupal is it? Exactly? And what are the versions of both PHP and MySQL? On the source and on the destination server? And have you tried setting host to Sometimes localhost fails to resolve. Shouldn't, but I've seen it happening. – Mołot Dec 15 '14 at 10:01
  • Drupal ver 7.34. PHP ver 5.4.27. MySQL ver 5.5.40. Unfortunately I don't know the versions on the source server as my client has fallen out with the previous company and we can't contact them. – Scott Bowers Dec 15 '14 at 10:05
  • Please edit details like that directly into the question. – Mołot Dec 15 '14 at 10:09
  • 2
    I suspect the DB host should be different than localhost. if your database is still on the old server than you should put the IP of that server. – shrish Dec 15 '14 at 10:09
  • 3
    possible duplicate of Error on my local MAMP: PDOException: SQLSTATE[HY000] [2002] – kenorb Sep 12 '15 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.