Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)' in C:\AppServ\www\bms\connect.php:4 Stack trace: #0 C:\AppServ\www\bms\connect.php(4): PDO->__construct('mysql:dbname=bm...', 'root') #1 C:\AppServ\www\bms\result.php(2): include('C:\AppServ\www\...') #2 {main} thrown in C:\AppServ\www\bms\connect.php on line 4
数据库配置问题,检查下吧
using password: NO 错误都告诉你了,没有传密码。检查一下new Pdo的时候有没有传密码
数据库连接密码的问题