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
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
I am having error to install Magento2
SQLSTATE[HY000] [2002] Connection refused
Parameter validation failed
What should I do to resolve this?
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")
Thanks for the update and quick reply. I'll be sure to keep an eye on this thread.
Yes of course i have ran the composer install, there is no more web setup wizard install?, only cli?, im running php 7.3 on Ubuntu, do i need to install some php extension? the docs are not clear. Charter Panorama
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
Try to run below command :
bin/magento setup:install \ --base-url=http://localhost/magento2 \ --db-host=localhost \ --db-name=magento \ --db-user=magento \ --db-password=magento \ --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 \ --search-engine=elasticsearch7 \ --elasticsearch-host=es-host.example.com \ --elasticsearch-port=9200