Magento removed web installation in 2.4.1 version, while installing from command line, I am getting below error:

 bin/magento setup:install --base-url=http://dev.magento.local/ --db-host=  --db-name=magento24 --db-user=root --db-password=Admin@123 --admin-firstname=admin --admin-lastname=admin [email protected] --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

SQLSTATE[HY000] [2002] Connection refused

In InstallCommand.php line 274:
  Parameter validation failed  


I managed to fix this . Please note the single quote in password

bin/magento setup:install --base-url=http://dev.magento.local/
--db-host=''  --db-name=magento24 --db-user=root 

1 Answer 1


--db-host= --db-password=Admin@123

Are you sure these are the credentials of your database?

--db-host= are you sure this isn't the port number of your mysql server??

  • Hi @Arbab , I have tried that also, --db-host= it gives me invalid credentials error. But my username and password is correct. Not sure what is happening. Oct 19, 2020 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.