Home>

I want to connect to DB using eclips and xampp, but I'm having trouble connecting.

Fatal error: Uncaught PDOException: SQLSTATE [HY000] [1044] Access denied for user'' @'localhost' to database's_ken' in C: \ Eclipse_for_PHP_Java \ xampp \ htdocs \ s_ken \ login_check.php: 6 Stack trace: # 0 C: \ Eclipse_for_PHP_Java \ xampp \ htdocs \ s_ken \ login_check.php (6): PDO->__ construct ('mysql: host = loca ...') # 1 {main} thrown in C: \ Eclipse_for_PHP_Java \ xampp \ htdocs \ s_ken \ login_check.php on line 6
Corresponding source code
$dbh = new PDO ("mysql: host = localhost;dbname = s_ken;charset = utf8");
What I tried

Please describe here what you have tried for the problem.

Supplementary information (FW/tool version, etc.)