mysqli_connect(): (hy000/2002): no connection could be made because the target machine actively refused it.

If you look at your XAMPP Control Panel, it's clearly stated that the port to the MySQL server is 3306 - you provided 3360. The 3306 is default, and thus doesn't need to be specified. Even so, the 5th parameter of mysqli_connect() is the port, which is where it should be specified.

You could just remove the port specification altogether, as you're using the default port, making it

$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';
$db     = 'test_db13';
References

mysqli_connect()
Standard connection of MySQL

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
Message: mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. port errior 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: 203 Warning: mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it in C:\xampp\htdocs\login\connect.php on line 8 failed to connect! ("SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it") Warning: mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. localwp Warning: mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. in C:\Users\ASUS\Local Warning: mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it in mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it in F:\Softwares\XAMPP\htdocs\Leave management system\dbcon.php on line 6 mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. wamp Warning: mysqli::mysqli(): (HY000/2002): No connection could be made because the target machine actively refused it Warning: mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\droid\admin\functions.php on line 5 mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. site:stackoverflow.com mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. wamp64 mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. xampp mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. xamp mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. phpmyadmin wamp digitalocean mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it in mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it in digitalocean mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it in wamp mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. phpmyadmin Warning: mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it in D:\xampp\htdocs\usahasaya\function.php on line 3 Warning: mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it in phpmyadmin : mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it in xampp Warning: mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it in D:\xampp\htdocs\online\db.php on line 9 Connection failed: No connection could be made because the target machine actively refused it (HY000/2002): No connection could be made because the target machine actively refused it Warning: mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. in Error: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it apache24 mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it windows 7 mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it phpmyadmin mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it site:stackoverflow.com phpmyadmin "manual" mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it phpmyadmin manual mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it phpmyadmin mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it phpmyadmin mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it arning: mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\enterprise\wp-includes\wp-db.php on line 1653 mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it iis server mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it iis mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. phpmyadmin error mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. laragon mysqli ERROR: Unable to connect: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it mysqli::__construct(): (HY000/2002): No connection could be made because the target machine actively refused it mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it stackoverflow Warning: mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\Autcomp\data.php on line 4 errorNo connection could be made because the target machine actively refused it. mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. in wamp Message: mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. wampp mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. wammp mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. Message: mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. Filename: mysqli/mysqli_driver.php Message: mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. in wamp Message: mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. mysqli_connect(): (hy000/2002): no connection could be made because the target machine actively refused it.
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source