嗨,当我使用 PDO 连接时,我是 PDO 连接的新手,我收到了那个错误
异常“PDOExecption”,消息“SQLSTATE [42000] [1044]”拒绝用户“@localhost”访问数据库“dev2anal_calltrack”,“root”,“在该文件中”
global $DB_HOST,$DB_NAME,$DB_USER,$DB_PASS;
$this->db = new Real_PDO("mysql:host=localhost;dbname=dev2anal_calltrack,root,");
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
通常root拥有所有权限,我也检查..