cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR 1045 (28000): Access denied for user 'magento'@'localhost'

SOLVED

ERROR 1045 (28000): Access denied for user 'magento'@'localhost'

I am trying to install Magento 1.9 on a test server following these instructions:
http://devdocs.magento.com/guides/m1x/install/installing_install.html

However when I try to create a database I run into this issue:
Under "Creating a Magento Database Instance"
 -> 5. Test the database instance

  max@ubuntu:~$ mysql -u magento -p
  Enter password:
  ERROR 1045 (28000): Access denied for user 'magento'@'localhost' (using password: YES)
 
  max@ubuntu:~$ mysql -u magento -p
  Enter password:
  ERROR 1045 (28000): Access denied for user 'magento'@'localhost' (using password: NO)

This is before I am even supposed to extract Magento.


When I google I find some forum discussions with similar problems but all answers seem to refer to
/app/etc/local.xml for the data base credentials.  I don't know where to find that.

My problem might be a different one though.

I am using
 - Ubuntu 16.04.4 LTS
 - Apache:  Server version: Apache/2.4.18 (Ubuntu)
 - mysql:   mysql  Ver 14.14 Distrib 5.7.21, for Linux (x86_64) using  EditLine wrapper
 - php:     PHP 5.6.34-1+ubuntu16.04.1+deb.sury.org+1 (cli)

Tags (1)
3 REPLIES

Re: ERROR 1045 (28000): Access denied for user 'magento'@'localhost'

Hi @marco_schindler,

 

It seems you have a credentials problem.

If you aren't allwoed to connect through shell the problem seems to be the Mysql user and/or password.

Can you confirm those credentials work?

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: ERROR 1045 (28000): Access denied for user 'magento'@'localhost'

Hi @Damian Culotta,

 

I think you are right about the credentials being the issue.

The thing is though, that I'm not familiar with data base administration.

I have got some coursework experience with SQL syntax from 13 years ago, but that's it.

 

So question 1 would be, how do I check or fix the credential issue?

Does it have to do with the "/app/etc/local.xml" file that I read about but don't know where to find?

 

Or question 2, do I have get familiar with data base administration first, before starting to work with Magento?

Re: ERROR 1045 (28000): Access denied for user 'magento'@'localhost'

Hi @marco_schindler,

 

1) If your Magento store is already installed you'll find the app/etc/local.xml file into your Magento directory.

I don't know were it could be (normally you can check on /var/www/html but it can be different on your server).

 

2) You'll need to know, at least, how to connect to your database.

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"