Magento Forum

   
SQLSTATE[28000] [1045] Access denied for user ‘magento’@’localhost’ (using password: YES) Database connection error. 
 
NickBudden
Jr. Member
 
Total Posts:  3
Joined:  2010-09-06
 

Hi.

I’ve been trying and trying to install magento on a few different domains. I continually get this error:

SQLSTATE[28000] [1045] Access denied for user ‘magento’@’localhost’ (using password: YES)
Database connection error.

Could someone please let me know why I could be seeing this?

Thanks for any help, will get rid of quite a bit of stress if I could fix this,

 
Magento Community Magento Community
Magento Community
Magento Community
 
SimpleHelixcom
Enthusiast
 
Avatar
Total Posts:  906
Joined:  2007-08-31
Huntsville, AL
 

Hello,

This error occurs when your database, username and password are incorrect.

Make sure you have access to a database on the system, and check your files for app/etc/local.xml - edit this file and insert the proper information and try it again.

Good luck! smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
NickBudden
Jr. Member
 
Total Posts:  3
Joined:  2010-09-06
 

Thanks a lot. I’m a little confused as to how to enter my database information. When I set up my database in CPanel the results page tells me that my database is prefix_mydatabase and prefix_myusername. There is a prefix space in the installer, so, does this mean that under database I enter only mydatabase and under username myusername?

Thanks again

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial Web Host
Guru
 
Avatar
Total Posts:  364
Joined:  2007-11-08
Phoenix, AZ
 

When you create a database and database user in cPanel, it prepends your cPanel username to each.

For examply - say your cPanel username is ‘domacom’. 

Now, you create a database named ‘magento’ - the actual database name is ‘domacom_magento’ - there is no prefix here - this is your full database name.  The same thing is true for the username. 

If you create a database user in cPanel named ‘dbuser’ - the actual database username would be ‘domacom_dbuser’ - again, there is no prefix, this if your full database username. 

So, when installing Magento it asks for database name, that would be ‘domacom_magento’ and the database username would be ‘domacom_dbuser’.  You would not put anything in the prefix field unless you are using database table prefixes, which you most likely are not.

Hope this helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
NickBudden
Jr. Member
 
Total Posts:  3
Joined:  2010-09-06
 

Thanks to everyone for the help!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top