Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Can't connect, PDO Exception: SQLSTATE[28000] [1045] Access denied for user


This question is not answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 7 - Last Post: Jun 25, 2014 7:42 AM Last Post By: Eduardo Nunes Threads: [ Previous | Next ]
Rob Indesteege

Posts: 4
Registered: 11/24/12
Can't connect, PDO Exception: SQLSTATE[28000] [1045] Access denied for user  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 29, 2012 8:36 AM
So I deployed my site to a remote server. This is the error i get while trying to connect:
Application raised an exception class EDatabaseError with message 'Can't connect, PDO Exception: SQLSTATE[28000] [1045] Access denied for user 'root'@'srv126.one.com' (using password: YES)'
Click for detailed information
Callstack #0 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/unit1.php Line: 29 |_Callstack #1 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/classes.inc.php Line: 2047 |_Callstack #2 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/classes.inc.php Line: 2120 |_Callstack #3 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/classes.inc.php Line: 1308 |_Callstack #4 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/db.inc.php Line: 115 |_Callstack #5 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/system.inc.php Line: 328 |_Callstack #6 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/dbtables.inc.php Line: 128 |_Callstack #7 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/db.inc.php Line: 90 |_Callstack #8 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/dbtables.inc.php Line: 207 |_Callstack #9 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/dbpdo.inc.php Line: 206


I have another site running on there aswell and this one works perfectly (purely coded in notepad++)
I m sure the databasename u/p is filled in correctly, how do i get rid of this error?

the page i m trying to connect to is a test page that just displays 8 rows of records.

Thanks in advance.
quinn wildman

Posts: 856
Registered: 12/2/99
Re: Can't connect, PDO Exception: SQLSTATE[28000] [1045] Access denied for user  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 29, 2012 8:43 AM   in response to: Rob Indesteege in response to: Rob Indesteege
Rob Indesteege wrote:
I have another site running on there aswell and this one works perfectly (purely coded in notepad++)
I m sure the databasename u/p is filled in correctly, how do i get rid of this error?

Let's start with the basics. What database are you using?
Rob Indesteege

Posts: 4
Registered: 11/24/12
Re: Can't connect, PDO Exception: SQLSTATE[28000] [1045] Access denied for user  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 30, 2012 2:47 AM   in response to: quinn wildman in response to: quinn wildman
quinn wildman wrote:
Rob Indesteege wrote:
I have another site running on there aswell and this one works perfectly (purely coded in notepad++)
I m sure the databasename u/p is filled in correctly, how do i get rid of this error?

Let's start with the basics. What database are you using?

local: MySQL 5.5.24
remote: 5.1.63-0+squeeze1

quinn wildman

Posts: 856
Registered: 12/2/99
Re: Can't connect, PDO Exception: SQLSTATE[28000] [1045] Access denied for user
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 30, 2012 7:51 AM   in response to: Rob Indesteege in response to: Rob Indesteege
Rob Indesteege wrote:
quinn wildman wrote:
Rob Indesteege wrote:
I have another site running on there aswell and this one works perfectly (purely coded in notepad++)
I m sure the databasename u/p is filled in correctly, how do i get rid of this error?

Let's start with the basics. What database are you using?

local: MySQL 5.5.24
remote: 5.1.63-0+squeeze1

Looks to be a MySQL Error. If you Google your error you will get many
hits. In my quick inspection, these two seemed to likely solutions:

http://drupal.org/node/1059244
http://coursesweb.net/php-mysql/pdo-introduction-connection-database
Rob Indesteege

Posts: 4
Registered: 11/24/12
Re: Can't connect, PDO Exception: SQLSTATE[28000] [1045] Access denied for user  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 3, 2012 3:00 AM   in response to: quinn wildman in response to: quinn wildman
quinn wildman wrote:
Rob Indesteege wrote:
quinn wildman wrote:
Rob Indesteege wrote:
I have another site running on there aswell and this one works perfectly (purely coded in notepad++)
I m sure the databasename u/p is filled in correctly, how do i get rid of this error?

Let's start with the basics. What database are you using?

local: MySQL 5.5.24
remote: 5.1.63-0+squeeze1

Looks to be a MySQL Error. If you Google your error you will get many
hits. In my quick inspection, these two seemed to likely solutions:

http://drupal.org/node/1059244
http://coursesweb.net/php-mysql/pdo-introduction-connection-database

can ANYONE advise a hosting provider that is proven to work?
I mean, we did try 2 different providers and both failed with the same error
and they will neve change the global settings just for us, we need to find a provider where these settings are correct in the first place
or maybe we have to change the way the program is accessing the data?

Charlie Dunsby

Posts: 1
Registered: 9/22/99
Re: Can't connect, PDO Exception: SQLSTATE[28000] [1045] Access denied for user  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2013 11:33 PM   in response to: Rob Indesteege in response to: Rob Indesteege
Check for firewall. I received the same error and it was the result of Antivirus/Firewall software.

Good luck.

Rob Indesteege wrote:
So I deployed my site to a remote server. This is the error i get while trying to connect:
Application raised an exception class EDatabaseError with message 'Can't connect, PDO Exception: SQLSTATE[28000] [1045] Access denied for user 'root'@'srv126.one.com' (using password: YES)'
Click for detailed information
Callstack #0 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/unit1.php Line: 29 |_Callstack #1 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/classes.inc.php Line: 2047 |_Callstack #2 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/classes.inc.php Line: 2120 |_Callstack #3 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/classes.inc.php Line: 1308 |_Callstack #4 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/db.inc.php Line: 115 |_Callstack #5 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/system.inc.php Line: 328 |_Callstack #6 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/dbtables.inc.php Line: 128 |_Callstack #7 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/db.inc.php Line: 90 |_Callstack #8 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/dbtables.inc.php Line: 207 |_Callstack #9 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/dbpdo.inc.php Line: 206


I have another site running on there aswell and this one works perfectly (purely coded in notepad++)
I m sure the databasename u/p is filled in correctly, how do i get rid of this error?

the page i m trying to connect to is a test page that just displays 8 rows of records.

Thanks in advance.
Denis Richard B...

Posts: 1
Registered: 3/12/14
Re: Can't connect, PDO Exception: SQLSTATE[28000] [1045] Access denied for user  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 6:35 AM   in response to: Rob Indesteege in response to: Rob Indesteege
Rob Indesteege wrote:
So I deployed my site to a remote server. This is the error i get while trying to connect:
Application raised an exception class EDatabaseError with message 'Can't connect, PDO Exception: SQLSTATE[28000] [1045] Access denied for user 'root'@'srv126.one.com' (using password: YES)'
Click for detailed information
Callstack #0 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/unit1.php Line: 29 |_Callstack #1 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/classes.inc.php Line: 2047 |_Callstack #2 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/classes.inc.php Line: 2120 |_Callstack #3 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/classes.inc.php Line: 1308 |_Callstack #4 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/db.inc.php Line: 115 |_Callstack #5 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/system.inc.php Line: 328 |_Callstack #6 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/dbtables.inc.php Line: 128 |_Callstack #7 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/db.inc.php Line: 90 |_Callstack #8 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/dbtables.inc.php Line: 207 |_Callstack #9 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/dbpdo.inc.php Line: 206


I have another site running on there aswell and this one works perfectly (purely coded in notepad++)
I m sure the databasename u/p is filled in correctly, how do i get rid of this error?

the page i m trying to connect to is a test page that just displays 8 rows of records.

Thanks in advance.

Hello everybody,

In my opinion, the problem is in H5B. I got the same problem yesterday (June 04, 2014) many years after this post. And still now, nobody can help to resolve that matter even from Embarcadero !
On local server, I can access MySQL database without problem using local user/password. On remote server, the pair user/password must be updated manually on xml.php file (datamodule that contain Database component).

I found that there is no change, I still get the same error. HostTranslation property (Database component) is set to false but I receive 'user'@'127.0.0.1' instead of 'user'@'localhost'.
After some hours of search, I decided to create another user on remote server who has all privileges on the target database and updated datamodule with values of remote server and redeploy the whole project.
When I tried this solution, I got the same error.

So, solution will come from Embarcadero ...
Eduardo Nunes

Posts: 4
Registered: 5/1/07
Re: Can't connect, PDO Exception: SQLSTATE[28000] [1045] Access denied for user  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 25, 2014 7:42 AM   in response to: Rob Indesteege in response to: Rob Indesteege
I experienced this many times,

One time it was because i forgot to enabled extension=php_pdo_mysql.dll in php.ini of html5 builder or php of apache

Other time i put a miss configuration in Datasource or DataField of a component

enjoy and share

Eduardo


Rob Indesteege wrote:
So I deployed my site to a remote server. This is the error i get while trying to connect:
Application raised an exception class EDatabaseError with message 'Can't connect, PDO Exception: SQLSTATE[28000] [1045] Access denied for user 'root'@'srv126.one.com' (using password: YES)'
Click for detailed information
Callstack #0 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/unit1.php Line: 29 |_Callstack #1 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/classes.inc.php Line: 2047 |_Callstack #2 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/classes.inc.php Line: 2120 |_Callstack #3 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/classes.inc.php Line: 1308 |_Callstack #4 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/db.inc.php Line: 115 |_Callstack #5 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/system.inc.php Line: 328 |_Callstack #6 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/dbtables.inc.php Line: 128 |_Callstack #7 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/db.inc.php Line: 90 |_Callstack #8 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/dbtables.inc.php Line: 207 |_Callstack #9 File: /customers/9/e/a/kinesoftware.be/httpd.www/Basket/rpcl/dbpdo.inc.php Line: 206


I have another site running on there aswell and this one works perfectly (purely coded in notepad++)
I m sure the databasename u/p is filled in correctly, how do i get rid of this error?

the page i m trying to connect to is a test page that just displays 8 rows of records.

Thanks in advance.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02