mark Posted August 3, 2011 Report Share Posted August 3, 2011 I'm a newbie here trying to get drupal installed. I've set up my database (mark_xxx) and a user with all priveledges to that database (mark_admin). I get this error message: Failed to connect to your MySQL database server. MySQL reports the following message: Access denied for user 'admin'@'localhost' (using password: YES).Are you sure you have the correct username and password?Are you sure that you have typed the correct database hostname?Are you sure that the database server is running? Fortunately there are not too many options to fill out but nevertheless it's not working. Database name: mark_xxxDatabase username: mark_adminDatabase password: mypassword Under advanced I haven't chenged anything, says localhost and the other fields blank. Any ideas or suggestions? thanks, mark Quote Link to comment Share on other sites More sharing options...
fshagan Posted August 3, 2011 Report Share Posted August 3, 2011 Fortunately there are not too many options to fill out but nevertheless it's not working. Database name: mark_xxxDatabase username: mark_adminDatabase password: mypassword Under advanced I haven't chenged anything, says localhost and the other fields blank. In both the database name and username, the "mark_" is the name of your account, right? In other words, when you set up your database in cPanel, it pre-fills in the "mark_" portion, right? I'm on a VPS, and use the full account and username, but I have been on shared hosts where you don't include the account name. In other words, try eliminating the "mark_" from the "mark_admin" user in the Drupal config file, and see if that works. Quote Link to comment Share on other sites More sharing options...
mark Posted August 3, 2011 Author Report Share Posted August 3, 2011 Wish I had good news but no. Made the changes, just used xxx for the dbname and admin for the dbusername and still get the ssme message: Failed to connect to your MySQL database server. MySQL reports the following message: Access denied for user 'admin'@'localhost' (using password: YES).Are you sure you have the correct username and password?Are you sure that you have typed the correct database hostname?Are you sure that the database server is running? Other ideas? Quote Link to comment Share on other sites More sharing options...
kuemerle5 Posted August 3, 2011 Report Share Posted August 3, 2011 I think I know what's going on here. You may have created the user, but did you add permissions for that user (mark_admin) to access/write/whatever else for the database you are installing Drupal to? To do this, go to cPanel>MySQL Databases and scroll down the the section labeled "Add User To Database". Select mark_admin as your user and mark_xxx as your database. Click "Add" and it will go to a new screen with a bunch of permissions. Usually, I just select all privileges. If you were really paranoid, you might check to see what essential permissions the Drupal MySQL user needs but seeing as how no one is allowed access to the MySQL server from the outside unless you explicitly allow it, it shouldn't be a problem. Hope this helps! Quote Link to comment Share on other sites More sharing options...
mark Posted August 3, 2011 Author Report Share Posted August 3, 2011 Good idea but already thought of that. I just reverified that mark_admin has all the priveledges to the database. Thanks for trying kuemerle5. Still stuck. Just fyi, I am using mddhosting as my host. mark Quote Link to comment Share on other sites More sharing options...
kuemerle5 Posted August 3, 2011 Report Share Posted August 3, 2011 Well, if you say you are using an actual domain for the MySQL host, then you should set it to "localhost". Quote Link to comment Share on other sites More sharing options...
mark Posted August 3, 2011 Author Report Share Posted August 3, 2011 I believe you mean in the "advanced options" section to use 'localhost' in the "database host" field. If so then yes, that's what I'm doing. Still can't get past that error. Quote Link to comment Share on other sites More sharing options...
kuemerle5 Posted August 3, 2011 Report Share Posted August 3, 2011 Aha, I have yet another idea. I run into this issue nearly always when installing Drupal 6. Leave the installer window open where the database connection page is open and just fill out the fields just in case Drupal validates if there's something there but don't click continue just yet. Open the file /sites/default/settings.php (it's something like that) and go to the database connection section. You'll need to put all of your login information there, save the file, then go back to the Drupal install. Now you can click continue/install/whatever. This is one of my last educated guesses, so I hope it works Quote Link to comment Share on other sites More sharing options...
mark Posted August 3, 2011 Author Report Share Posted August 3, 2011 ding, ding, ding, problem solved. Thank you kuemerle5 for pointing me in the right direction. I opened up the settings.php and saw the format of the setting: $db_url = 'mysql://username:password@localhost/databasename'; My password had an apostrophe in it so as soon as I started typing it into the line above I said to myself "duh, how will the parser handle that extra apostrophe." Changed my database password , tried it without my account name mark_ and it failed. Then I put the full user and database name of mark_admin etc - VOILA, IT WORKED! thank you so much. take care and have a great day. Hopefully I'll have no further difficulties. Quote Link to comment Share on other sites More sharing options...
kuemerle5 Posted August 4, 2011 Report Share Posted August 4, 2011 Haha, yep, np Drupal 7 fixed this issue but at least you'll know about this little quirk in D6! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.