cancel
Showing results for 
Search instead for 
Did you mean: 

magento 2 setup install database error

Highlighted

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

 

2 REPLIES 2
Highlighted

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

 

Highlighted

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?