Database problem after moving the site: unknown server error I just moved my site onto the server and put it under /drupal_test directory. I now have got an error in the browser, but there is no errors in the apache error log:

PDOException: SQLSTATE[HY000] [2005] Unknown MySQL server host 'http://www.mydomain.com' (1)
in lock_may_be_available() (line 167 of /var/www/drupal_test/includes/lock.inc).


I have searched around online, many suggests that this is a problem with settings.php, but I can't see any problem with my settings:

$databases = array (
  'default' =&gt; 
  array (
    'default' =&gt; 
    array (
      'database' =&gt; 'websitedb',
      'username' =&gt; 'websitedbusername',
      'password' =&gt; 'thepassword',
      'host' =&gt; 'http://www.mydomain.com',
      'port' =&gt; '',
      'driver' =&gt; 'mysql',
      'prefix' =&gt; '',
    ),
  ),
);


I tried to use the ip address as the host, I got an error like this:

PDOException: SQLSTATE[HY000] [2013] Lost connection to MySQL server at
'reading initial communication packet', system error: 111 in lock_may_be_available()
(line 167 of /var/www/drupal_test/includes/lock.inc).


Also, my current site www.mydomain.com works fine.

Any help will be very much appreciated! Thanks!
In the above database configuration the problem seems to be with the host, you need to enter the "database hostname", or try entering the static ip "xxx.xxx.xxx.xxx" of the database host.

Aslo check the credentials of your database if they are correct or not. Discussion about the same issue faced be other people is available at: https://drupal.org/node/1315592 .