cancel
Showing results for 
Search instead for 
Did you mean: 

Getting a "An error has happened during application run" Exception mentions issue with Ph

Getting a "An error has happened during application run" Exception mentions issue with Ph

main.CRITICAL: SQLSTATE[HY000] [2002] Connection refused {"exception":"[object] (Zend_Db_Adapter_Exception(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /home/dhimart/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144, PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /home/dhimart/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:128)"} []

4 REPLIES 4

Re: Getting a "An error has happened during application run" Exception mentions issue with

Hey phazylgmai, 

 

It looks to me that the Mysql is not connected. Have you tried reviewing reviewing the mysql configuration in the env.php? 

 

We can definitely hop on a call if you'd like?  

 

 

Re: Getting a "An error has happened during application run" Exception mentions issue with

@phazylgmai 

 

There can be couple of reasons. Look for the database connection details in <Magento root>/app/etc/env.php. Make sure you have correct details.

 

Make sure mysql is running on the server and you are able to connect mysql as well and Magento database using the credentials added in env.php file.

- Tarandeep
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.

Re: Getting a "An error has happened during application run" Exception mentions issue with

Hi, I'm actually working on an Amazon EC2 instance and I was trying to change the memory limit in php.ini, I may have altered the contents of the file incorrectly. I'm a newbie so is there any way I can replace the php.ini with a default file?

Re: Getting a "An error has happened during application run" Exception mentions issue with

@phazylgmaiIf you have the backup then you can use it. If no backups then under PHP folder it normally provides an additional php.ini. If there is no additional php.ini then download one from internet.

 

You can compare both to find out where the issue is. Fix it and upload the fixed php.ini.

 

- Tarandeep
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.