"No Privileges" database error

I cant connect too.
My code is:

Blockquote<?php

$servername = “localhost” ;
$username = “username” ;
$password = “*******” ;
$db_name = “db name” ;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

echo “Connected successfully”;

?>

Blockquote

Image of the posible solution:

Good day!

The connection to your database is working fine now. Please try again and make sure the credentials are matching with the ones from 000webhost cPanel. :slight_smile: