Welcome Guest, Not a member yet? Register   Sign In
Unable to connect to your database server using the provided settings.
#5

Here is some test code to see if your login is correct.

PHP Code:
<?php
// Code to create the database

// Add your own username and password
$serverName "localhost";
$userName   "username";
$password   "password";

// Create the Database Connection
$connId mysqli_connect($serverName$userName$password);

// Check the Database Connection
if ($connId === false)
{
    exit("ERROR: Could not connect. " mysqli_connect_error());


// Create the Database
// Add your datya
$sql "CREATE DATABASE yourDatabaseName";

// Check that the Database was created
if (mysqli_query($connId$sql))
{
    echo "Database created successfully";
}
else
{
    echo "ERROR: Creating Database. " mysqli_error($connId);
}

// Close the Connection
mysqli_close($connId);

?>
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: Unable to connect to your database server using the provided settings. - by InsiteFX - 05-16-2021, 03:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB