my code is as below
$dbhost = 'example.com';
$dbuser = 'dbusername';
$dbpass = 'dbpassword';
$dbName='dbname';
$conn = new mysqli($dbhost, $dbuser, $dbpass, $dbName);
// check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
after i execute code getting below error Connection failed: Connection refused Warning: mysqli::__construct(): (HY000/2002): Connection timed out in /home/public_html/test/remote.php on line 8 Connection failed: Connection timed out