cancel
Showing results for 
Search instead for 
Did you mean: 

Clean install 2.4.0 setup:install database password fails because it has special characters

Highlighted

Clean install 2.4.0 setup:install database password fails because it has special characters

Trying to install a clean version of the much more "secure" version of Magento 2.4.0 CE but when  run the install:setup via the cli it throws an error:

SQLSTATE[HY000] [1045] Access denied for user 'admin_..........'@'localhost' (using password: YES)

The password is correct & found another thread that said it was because the password contained special characters so I removed the special characters & it worked.  It also said that if you place a \ before the special character it works but it didn't for me.

Surely this has to be a bug.

 

3 REPLIES 3
Highlighted

Re: Clean install 2.4.0 setup:install database password fails because it has special characters

Hi @anim8design 

 

This issue can be created for local.xml .

First,check database username ,database name,datauser password..... etc in local.xml (path yourmagentodir/app/etc/)

Check there have any local.xml.bak.If exits then delete local.xml.bak.

check database permission issue for database user.

Clear cache from cache folder (path yourmagentodir/var/cache/)

 

It may help you !

Thank you.

Highlighted

Re: Clean install 2.4.0 setup:install database password fails because it has special characters

There is no local.xml in app/etc but isn't it stored in env.php now for magento 2.

I assume the env.php file isn't there yet because the initial setup hasn't been run because it's rejecting the password because of the special character.

The password is definitely correct as like I said earlier if I remove the special character from the password & set up a new database the setup runs normally.

Highlighted

Re: Clean install 2.4.0 setup:install database password fails because it has special characters

I've been trying a few things to get this to work & this morning when I tried to run the setup:install this happened:

 

> --db-password=Tyi!nq06rgBJt6qb \

-bash: !nq06rgBJt6qb: event not found

 

It looks like when you have special characters in the password Magento doesn't recognise anything before the special character.

 

I can't be the only one that has this problem.