Click here to Skip to main content
15,905,967 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\bbash\database.php on line 4


What I have tried:

i changed the port number and max_allowed_packet number
Posted
Updated 29-Feb-20 22:09pm

1 solution

We can't tell - we have no idea what your code looks like (and line 4 is probably a connection), we have no idea what DB you are trying to connection to, we don't have your login data if we could find the DB, and we don't have the same setup as you: Heck, we don't know if the DB is local to your Dev machine, on the same LAN, or on the internet!

Start by establishing a connection using your DB management system, and make a note of the connection string. Then try that and if it works, compare it to what you are using in your code at the moment. If you can;t get a connection with a management system, then you need to start looking at MySQL setup, firewalls, and so forth - none of which we have any access to!

Sorry - but we really can't help you with what you have given us!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900