cancel
Showing results for 
Search instead for 
Did you mean: 

New User Frustration - Access denied for user....

New User Frustration - Access denied for user....

I am in the process of setting up a new Magento 2 store, moving over from an older obscure shopping cart, and have spent several frustrated days trying to get started.  I am looking to edit the files locally in Dreamweaver, and am using WAMP64.  Unfortunately I haven't been able to get the PHP files to open correctly, continually getting the Dreamweaver message "Dynamically-related files could not be resolved because the server cannot be reached".
When I try to load the site in a browser locally, I get the message "There has been an error processing your request".  After doing some research I was to turn on error reporting, so the error message is "SQLSTATE[HY000] [1045] Access denied for user 'i3830323_mg2'@'localhost' (using password: YES)".
With a lot of online research I've been able to find that my error is probably related to a MySQL configuration error, relating to the password, however I haven't been able to figure out how to fix and get past this error.

I am not very strong on web development, MYSQL, MyPHP, etc, so I can't figure out how to get around the error.
Any advice or assistance would be greatly appreciated!
Thanks,

Bill

5 REPLIES

Re: New User Frustration - Access denied for user....

Hi @SSC_Bill,

 

That error says that you are using the wrong database credentials.

On Magento 2 you'll find your database configuration on /app/etc/env.php.

 

You'll find something like this on that array:

 

  'db' => 
  array (
    'table_prefix' => '',
    'connection' => 
    array (
      'default' => 
      array (
        'host' => 'localhost',
        'dbname' => 'DATABASE_NAME',
        'username' => 'DATABASE_USER',
        'password' => 'DATABASE_PASSWORD',
        'active' => '1',
      ),
    ),
  ),

Take a look at that section and check if your credentials are OK.

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

Re: New User Frustration - Access denied for user....

Thank you for your reply.  Indeed that looks exactly what the issue is.  I copied the files from my default Magento install from my GoDaddy Apps panel to my local PC.  I'm sure the values listed in the env.php file are the defaults from the GoDaddy set up...and I'm sure they are correct for the "live" version.

The issue I have is that when I am trying to edit the files on my local PC and using WAMP64 for the localhost, I get the error I mentioned originally.

Talking through the issue helped, and it looks like I may have my issue resolved!

I was missing the key step of actually creating a dB for the install to use (sorry, I'm new at this).  I copied (FTP'd) a backup of my dB file from my webhost, and then imported that file into WAMP.  The last step was to create a new user on the imported dB to match the info on the env.php file you pointed me to, and now the files appear to be loading in Dreamweaver.

I've got some more testing to do before I can consider this closed,  Thanks!!

Re: New User Frustration - Access denied for user....

I've made some headway, after getting tied up around the axle a bit, with a redirect in the dB that kept sending me to my live site, when I was trying to get to my localhost version.  I think I got that licked.

 

Now I am stuck with the message:
There has been an error processing your request
Required parameter 'theme_dir' was not passed

Re: New User Frustration - Access denied for user....

Hi @SSC_Bill,

 

Can you copy the full content of the report?

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

Re: New User Frustration - Access denied for user....

I re-applied the base theme to my active Magento install on, and then exported and re-imported the database locally.  After performing these action I took another step forward, and subsequently on step back.  My webpages are now loading using localhost, on my PC, however they appear to have no formatting. MagentoSiteScreenShot.jpg