Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By drupaldeeduper on
Hi,
During the "Set up database" phase of installation, I get the following error:
Failed to connect to your database server. The server reports the following message: SQLSTATE[28000] [1045] Access denied for user 'drupal_a2z'@'web8.hosting.digiweb.ie' (using password: YES).
MySQL db name: drupal
username: a2z
Entry:
Database name: gerardo_drupal
Database username: drupal_a2z
Can someone point out where I'm going wrong?
Comments
it usually turns out someone
it usually turns out someone made a typing mistake setting up the db user name or name or password. create database user or database user's password again
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
I've double checked the login
I've double checked the login details and the spelling is correct.
Any other suggestions?
Yes
Maybe mysql recognizes the user but that user has not been granted sufficient rights on the database. You do not say how you set up the database.
So here is how you prove to yourself this is not a Drupal problem. If you 'know' your database user name and password are correct you will be able to connect to the database using those credentials in phpmyadmin, or via command line.
for example from a shell window do
mysql -u username -ppassword databasename
(no space after -p, replace username, password and databasename with your user name, password, and database name)
If you get an access denied message now that proves you have wrong user name or password and the problem has nothing to do with Drupal. If you can connect this way but not in Drubal with the same credentials, you have discovered a new bug in Drupal.
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
Yes I forgot to mention, It's
Yes I forgot to mention,
It's a MySQL database with a single dba user and I can connect directly using phpMyAdmin using the username gerardo_a2z and the correct password.
I'm also using the following advanced settings:
Database host: mysql2.hosting.digiweb.ie
Port: 3306
I don't know. Any idea why
I don't know. Any idea why you are getting web8.hosting.digiweb.ie when you db server is mysql2.hosting.digiweb.ie? Something wrong there somewhere. Did you enter you backend database settings in settings.php? I have never set this up, so not the best person to advise, but I think you have to. Maybe google gives some guidance....
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
I'm not too sure. I've been
I'm not too sure.
I've been contacting my host, but nothing fruitful has emerged yet.
Does anyone have any ideas?
It might be useful to know
It might be useful to know why you have your db on a separate server. Unless you are running a heavy-traffic site where you really need this, I would be tempted to move hosts. But if you prefer to use a host who uses separate db server, the first thing to look at is probably the db user permissions: see this post http://drupal.org/node/262393#comment-856881
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
SQLSTATE[HY000]: General error: 1 no such table: block_custom
SQLSTATE[HY000]: General error: 1 no such table: block_custom
Solution
I was having the same problem!!
Drupal is too lazy! what you have to do, is to create manually a DB, and you put the good Login and Password when you install Drupal!
it woooorks!
Another Solution
After having set up the DB and user with access via localhost and pounding my head over why D8 would stall with the cannot connect error, I tried changing the host to 127.0.0.1 (for which the user did NOT have privileges!)
Bingo, it worked. Go figure.
The suggestion from Druper
The suggestion from Druper worked for me on an installation with local (!) database server. With such a basic setup it has never been necessary to replace 'localhost' (default setting) with '127.0.0.1' (IP address for localhost).
Another issue which caused me a lot of headache are setups with a remote database server - mysterious "access denied" errors. The solution is often very simple: By default,
mysqld
blocks a host after 10 connection errors. This limit is quickly reached, e.g. when you restore a backup which points to a different server or uses different credentials. To resolve this, you can do amysqladmin flush-hosts
.MYSQL Management Tool
I am probably too late to this topic.
I had encountered the same problem, but very recently. I had MySQL Workbench installed so setup the database. My environment was Xampp, MySQL Workbench and Drupal 7.
When I created another user with PhMyAdmin it wokred. I think it's probably something to do with the version of Workbench I had installed.
i think you are missing the
i think you are missing the database password while installing the drupal in LAMP server.
Don't think so
The other replies suggest issues on MySQL level. The security in MySQL uses the format user@host. When using the name localhost as host, it requires you to have 127.0.0.1 localhost in your host file. MySQL considers user@127.0.0.1 different from user@localhost.
Which is why on the windows platform you have three different users: root@127.0.0.1, root@::1, root@localhost.
So, your underlying infrastructure needs to be properly configured and upon install you need to provide correct information. When it doesn't work there is something wrong! Either a typo or bad configuration.
This actually happened for me as well.
In my MacBook, I have installed MAMP then after some time I got it that the password I entered was wrong. In MAMP, mysql Password is also set as "root" .