Jump to content
MDDHosting Forums

drupal 6.22 install help - getting failed to connect to mysql


mark
 Share

Recommended Posts

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_xxx

Database username: mark_admin

Database password: mypassword

 

Under advanced I haven't chenged anything, says localhost and the other fields blank.

 

Any ideas or suggestions?

 

thanks, mark

Link to comment
Share on other sites

 

Fortunately there are not too many options to fill out but nevertheless it's not working.

Database name: mark_xxx

Database username: mark_admin

Database 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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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!
Link to comment
Share on other sites

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 :)
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...