@speed_daemonwrote:

I have created a database using the database Wizard and added the users with all credentials, when I try to get a connection to my database it fails my domain is swaziprocurement.com and I have a single page for now swaziprocurement.com/connect.php but I am failing to connect to my database when I test this connection.

Here is my code:

<?php
$db_name="mbuso81";
$db_user="redsey";
$db_pass="redsey";
$db_host="swaziprocurement.com";
$conn=mysqli_connect("swaziprocurement.com","redsey","redsey","mbuso81");
if (!$conn){

echo "Fail!";
}
else {

echo "Success!";
}
?>

I have a connection to a database that I just created using the wizard but I cant seem to connect to it when I test the connection using PHP


Hi @speed_daemon,
While normally we do not provide support to code, your answer seems to potentially have the wrong host information. If the database is hosted on the same service most people can use
$db_host="localhost";

Best regards,

Michael A. - GoDaddy | Employee
24/7 support available at x.co/247support

View solution in original post