Warning when calling db

I have built a new site witout knowledge and got this when connecting db:

Warning : mysqli::__construct(): (HY000/1044): Access denied for user ‘ringstac_chefen’@‘localhost’ to database ‘ringstac_pris’ in /home/ringstac/public_html/lasyr.php on line 78
Connection failed: Access denied for user ‘ringstac_chefen’@‘localhost’ to database ‘ringstac_pris’

Checked db name and server, pw, user etc but what is wrong? Is there a permission problem?

Yes. Either the username and / or password are incorrect, or the user does not have access to that database.

Hi, username, pw and all is ok and user is set as current user on db. is there any other permission i miss?
Code:

$servername = “localhost”;
$username = “ringstac_chefen”;
$password = " xxxxx where xxxx is my pw";
$dbname = “ringstac_pris”;

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

Ohhh, just found the “priviliges” for user. Everything is working - GREAT!

Sponsor our Newsletter | Privacy Policy | Terms of Service