Hi I'm trying to migrate my drupal site from my local dev environment to the host. I've uploaded the db and sites files, edited the settings.php file but when I go the the main page I get the below error without any of the default theme

The site is currently not available due to technical problems. Please try again later. Thank you for your understanding.

If you are the maintainer of this site, please check your database settings in the settings.php file and ensure that your hosting provider's database server is running. For more help, see the handbook, or contact your hosting provider.

I don't think it's an error with the db username and password, because if I actually change the username and password to something wrong I get this additional message (with the default theme):

The mysql error was: Access denied for user 'username'@'dbhost' (using password: YES).

Do I need to worry about the include directories at all?

I have enough memory when I do a phpinfo I get 90M for my settings.

Anyway any help would be appreciated.

MS

Comments

mightyulysses’s picture

Hi try clearing your cache in the db and everything should be fine :)

amolbhavsar’s picture

Hi,
I got the same problem.
And I found that if Drupal does not get connection to MySQL, it goes off-line.
Please confirm that MySQL server is running and also if Drupal is able to connect to Database.

Thanks.

positiverep’s picture

I'm having the same problem. How do you clear the cache if you can't login (the homepage isn't showing up). Thanks in advance

WorldFallz’s picture

access the db with something like phpmyadmin and empty the cache* tables.

positiverep’s picture

Thanks very much!

positiverep’s picture

Sorry, do I empty every table with cache in it? There are 13 in my database, might that cause problems if I empty all of them?

WorldFallz’s picture

Yes you can EMPTY (not drop) them safely-- they are only temporary data and the site rebuilds them automatically.

positiverep’s picture

Thanks, I tried that and it's still offline. It also says:
If you are the maintainer of this site, please check your database settings in the settings.php file and ensure that your hosting provider's database server is running. For more help, see the handbook, or contact your hosting provider.

But I'm almost 100% sure I've settings.php done right.

Here's a link to the site if anyone cares to take a look:
http://www.thehaltingsite.com/

Thanks very much!

stephenrobinson’s picture

log into mysql

mysql -u root -p
mysql >>password
mysql >>GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON databasename.* TO 'username'@'localhost' IDENTIFIED BY 'password';

positiverep’s picture

Sorry, I'm new to this, what do ya mean by that?

stephenrobinson’s picture

ah that was a fix for Access denied for user 'username'@'dbhost' (using password: YES), if you can change the settings.php, it suggests your applications can read the file, which are the main 2 causes..

positiverep’s picture

Well, to change it I open it in dreamweaver and I've to make it writable before I can edit it. Is that what you mean?

alar’s picture

That did it thanks. Then i was able to go in and fix the cause of the problem which turned out to be a missing table!

czuroski’s picture

hello,
I recently downgraded php on my server from 5.3 to 5.2. Upon completing the downgrade, I cannot see any content on my site. All that I see is the following - The site is currently not available due to technical problems. Please try again later. Thank you for your understanding.

I tried going to the /user page, but the same error appears. Does anyone have any thoughts on what I can do to begin troubleshooting?

Thanks

czuroski’s picture

This ended up being a problem with the php installation. I completely removed and reinstalled php, and it is working perfectly now.

TheJohnny’s picture

I had the same problem after downgrading 5.3.3 => 5.2.14 and the mentioned "The site is currently not available [...] ensure that your hosting provider's database server is running [...]" error.
The Problem was that the new (old) php version used a different path to mysql.sock

To verify this:

1st find out which socket php uses:
php -i | grep MYSQL_SOCKET

In my case this was
MYSQL_SOCKET => /var/lib/mysql/mysql.sock

2nd check the path mysql uses:
more /etc/my.cnf | grep socket

This was
socket = /var/run/mysql/mysql.sock

I simply changed the path in my.cnf to /var/lib/mysql/mysql.sock and everything worked well

jumoke’s picture

clearing cache did it for me

Liam_Mc’s picture

I'm having a similar problem. I recently moved a Drupal 6.22 site to another server and got it working correctly with all the content by copying all the files to the new server and then importing the database into phpmyadmin. Once I clear the caches I can then navigate round the site and make various changes etc and everything seems to look and work normally. However, when I then log out the site gives the message above. I then can't log back in. I've tried all the above advice but can't make any progress. Any thoughts / advice would be much appreciated.
Best wishes,
Liam
Ps. 2 Drupal 7.8 sites were migrated seamlessly to the same server.
PHP version on old server: PHP 5.2.6-1+lenny13 with Suhosin-Patch 0.9.6.2 (cli)
PHP version on new server: PHP 5.3.3-7+squeeze3 with Suhosin-Patch (cli)

cmstom’s picture

In our case we migrated a bunch of Drupal 6 & 7 sites from Windows Server 2008 to 2012. Emptying cache tables didn't work. We turned PHP reporting on and set to display to the screen. We just created new MySQL users.

Thomas Newman
Drupal Developer, Site Builder, Themer

vm’s picture

samozin’s picture

i had the same problem and found that my new server does not support mysqli
so mysqli was not installed
i changed the the setting.php connection to db from mysqli:user/pass.......
to mysql :user/pass.....

removed the letter i
and worked fine for me
thanks