Error running setup:upgrade on live server in magento 2.2.4 I get Port must be configured within host parameter (like localhost:3306

Viewed 1330

When I run the following command php bin/magento setup:upgrade in the root of my magento application I get the following errors;

root:/var/www/www-root/data/www/blessingcomputers.com# php bin/magento setup:upgrade
Port must be configured within host parameter (like localhost:3306)
[Zend_Db_Adapter_Exception]                
SQLSTATE[HY000] [2002] Connection refused  
                                           
[PDOException]                             
SQLSTATE[HY000] [2002] Connection refused 

Please assist how do i fix this?

1 Answers

I had a similar problem and for me the solution was to change my host config variable from localhost to 127.0.0.1, then it could connect.

Related