Can't remote connect to MySQL database after cloudflare

I have a site running on VPS but recently added cloud flare to it and now m unable to connect to Mysql remotely m getting error Can’t connect to MySQL server on ‘’ (110).

Please look into it

Typically this is because you’d be connecting to a proxied record, in your case you seem to connect to your actual IP address however. That must be something on your database side then and you need to check on your server.

These issues are not Cloudflare related, as Cloudflare does not handle database connections at all.

My server is up and running and I have allowlisted the IP for the domain from which i want to connect.

and below is the connection setting

<?php session_start(); $host = "**.**.**.**"; $username = "aaaaaaa"; $password = "aaaaaaaaa"; $database = "aaaaa"; $port = "3306"; // Create connection $conn = mysqli_connect($host, $username, $password, $database, $port); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } date_default_timezone_set('Asia/Kolkata'); ?>

Well, the error message indicates something else and it specifically refers to your IP address, so it is not proxy related. You really need to check this on your server and ask at StackExchange if you cant fix it yourself.

This topic was automatically closed after 14 days. New replies are no longer allowed.