I'm new to PDO and am trying to use it on xampp for windows. I keep getting an error relating to the host and have tried changing 'localhost' to everything possible such as ip address and sockets but i believe i'm not doing it right. I've also tried changing the variable for pdo_mysql.default_socket but I don't believe that it's working/I'm doing that right either.This is the error I'm getting:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000] [1044] Access denied for user 'admin'@'localhost' to database ''xxxxxx''' in C:\xampp\htdocs\faculty\classes\db.class.php
This is what i currently have in my php
self::$instance = new PDO("mysql:host=localhost;dbname='xxxxxx'", 'admin', 'xxxxxxx');