I just created a database by importing SQL file. I have created users added privileges but when I try to connect by PDO it throws this error:
(Uncaught PDOException: SQLSTATE[28000] [1045] Access denied for user xxx)
even though the username and password is correct.
I am having hard time to solve this. I deleted the database and also created again another database but it seems nothing will work.
$host = "example.com";
$db = "sgOnlineSystem";
$user = "xxx";
$pass = "xxxx";
$conn = new PDO("mysql:host=$host;dbname=$db", $user, $pass);