Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I am new to Drupal. I am currently using Drupal 7 and created a simple website with a few pages on my local computer. I have Drupal installed in my XAMPP directory, so the directory looks like this: c:\xampp\htdocs\drupal\

I signed up for a domain and trying to upload my Drupal site to the web hosting company to go live.

I searched for many sites for step-by-step instructions how to do it. This is what I got and this is what I did: 1. backup my drupal database on my computer 2. create a new blank database on the host 3. upload my local files on my computer to the host (I assume I need to upload all the files inside the Drupal directory, is that correct?) 4. import my backed up database to the host 5. change the settings.php in the host. Is that the only file and place I need to change? This is what I changed: $databases = array ( 'default' => array ( 'default' => array ( 'database' => 'yyyyy_xxx', <== Can I use a different database name than the one I use on my localhost? 'username' => 'yyyyy_xxx', <== Can I use a different username than the one I use on my localhost? 'password' => '12345', <== Can I use a different password than the one I use on my localhost? 'host' => '', <== Should I be using my new site's domain name here or localhost since all the files are sitting at the web hosting company's server? 'port' => '', 'driver' => 'mysql', 'prefix' => '', ), ), );

  1. refreshed my webpage and I got the following error:

Error The website encountered an unexpected error. Please try again later. Error message PDOException: SQLSTATE[HY000] [1129] Host 'box373.bluehost.com' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' in lock_may_be_available() (line 167 of /home3//public_html/includes/lock.inc).

I logged into my account on the hosting company using putty and went to public_html/ and entered 'mysqladmin flush-hosts'. I got an error:

mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'xxx'@'localhost' (using password: NO)'

xxx is the database name I used on my localhost. The new database name on the host is yyyy_xxx. Is it still referring to my localhost database eventhough I changed the settings in settings.php file on the host?

I would appreciate it if somebody can help me and give me some insights how to fix this problem.

Is this the correct procedure to upload files to the host for my website to go live? Besides settings.php file, are there any other files I need to change? How do I unblock mysqladmin using flush-hosts? Some websites suggest to include username and password to login to mysqladmin. I entered 'mysqladmin -uyyyy_xxx -p12345 flush-hosts' and I got the following error:

mysqladmin: refresh failed; error: 'Access denied; you need (at least one of) the RELOAD privilege(s) for this operation'

How do I prevent this problem to happen again? I just uploaded a few files to the host and I got this problem. In the future, I am going to upload the complete website to the host with way more files. I would like to find out the correct way to launch a Drupal website.

Many many thanks!

share|improve this question
have you given your user the required permissions? – Mohammed Shameem Jan 23 at 4:19
did you change db info from template.php ? recheck – monymirza Jan 23 at 7:46
@Shammem: How and where and which files can I give user required permissions? Thanks! – cecilia xavier Jan 23 at 10:32
@monymirza: I checked template.php from drupal/all/themes/danland and it doesn't have any db info in that file. Please advice. Thanks! – cecilia xavier Jan 23 at 10:36
Sorry. it was settings.php under /sites/default . – monymirza Jan 24 at 4:54

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.