cancel
Showing results for 
Search instead for 
Did you mean: 

magento 2 setup install database error

magento 2 setup install database error

sudo ./magento setup:install --base-url=http://127.0.0.1:8500 --db-host=localhost --db-name=magento2 --db-user=root --db-password=1234 --admin-firstname=admin --admin-lastname=admin --admin-email=admin@admin.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1

-after running above command it shows following error

SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

[InvalidArgumentException]
Parameter validation failed

 

6 REPLIES 6

Re: magento 2 setup install database error

Hello @nikhil_mhatre,

 

Can you please run below command in magento2 root directory, don't use sudo

php bin/magento setup:install --base-url=http://127.0.0.1:8500/  --db-host=localhost --db-name=magento2 --db-user=root --db-password=1234  --admin-firstname=admin --admin-lastname=admin --admin-email=admin@admin.com --admin-user=admin --admin-password=admin123 --language=en_US  --currency=USD --timezone=America/Chicago --use-rewrites=1

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

 

Re: magento 2 setup install database error

I am having error to install Magento2

SQLSTATE[HY000] [2002] Connection refused

Parameter validation failed

 

What should I do to resolve this?

Re: magento 2 setup install database error

Hi @ecinitiative ,

I had the same issue. It's happening because the connection was trying to connect to port 8500 which you set in --base-url. You are using localhost with port 8500 so you must specify the MySql port too. In my case, I used MAMP with port 8888 and MySql with port 8889 (--base-url="http://127.0.0.1:8888/" --db-host="127.0.0.1:8889")

Re: magento 2 setup install database error

I will write it acordingly if i need some help!

Re: magento 2 setup install database error

Thanks for the solution it worked fine for me as well!

 

 

 

 

WalgreensListens

Re: magento 2 setup install database error

Thanks for the update and quick reply. I'll be sure to keep an eye on this thread.