0
votes

I've this problem when I'm trying to run my PHP MySQL script. When I try to run my .php file this is what I get.

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: 135

Backtrace:

File: C:\wamp\www\acc\index.php Line: 292 Function: require_once

image

1
Welcome to Stack Overflow! Can you add some code context so we can see what's going on please?Can O' Spam
I can see in your image, you are using a class to determine the connection attributes, can you add how these are set, where and the full class please? (Obviously without sensitive data)Can O' Spam
At first sight, you are connecting to machine which not listen on that port. Verify that hostname/port combination is correct (eg. using telnet or nmap)rkosegi

1 Answers

0
votes

this is mysql error change your msql port to 3306