CodeIgniter Forums
No connection could be made because the target machine actively refused it. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: No connection could be made because the target machine actively refused it. (/showthread.php?tid=69893)



No connection could be made because the target machine actively refused it. - davy_yg - 01-27-2018

Hello,

I am trying to setup my online site offline in my localhost yet I am getting this error message:


Code:
A PHP Error was encountered
Severity: Warning
Message: mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it.
Filename: mysqli/mysqli_driver.php
Line Number: 202
Backtrace:
File: C:\xampp\htdocs\pureline\application\controllers\Site.php
Line: 17
Function: __construct
File: C:\xampp\htdocs\pureline\index.php
Line: 292
Function: require_once
A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: C:/xampp/htdocs/pureline/application/controllers/Site.php
Line Number: 17


I am not sure why that's happening?


RE: No connection could be made because the target machine actively refused it. - InsiteFX - 01-28-2018

Then you either did not setup MySQL or your user name and password are wrong.


RE: No connection could be made because the target machine actively refused it. - paulwings - 02-25-2020

This error is a network-related error occurred while establishing a connection to the Server. It means that the error is occurring because there is no server listening at the hostname and port you assigned. It happens that something is preventing a connection to the port or hostname. Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that specific port. This may be because it is not running at all or because it is listening on a different port.