<?php
$servername = "localhost";
$username = "user";
$password = "pass";
$dbname = "db_name";
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
echo "connection problem";
//die("Connection failed: " . $conn->connect_error);
}
This is the code of this page on my website. Until last week everything seemed to be working fine. But recently I'm getting an error message, What happened suddenly to cause this error? The user exists for the respective database, and all was fine till last week, and I haven't made any changes in my code either. The problem got away on replacing localhost with 127.0.0.1