以root身份:使用正確憑據拒絕訪問,發生了什麼?
GRANT ALL PRIVILEGES ON * . * To 'JKR'@'%' IDENTIFIED BY "";
FLUSH PRIVILEGES;
在PHP:
$con = new PDO("mysql:host=127.0.0.1;dbname=jkr;charset=utf8", "JKR", "");
錯誤消息:
Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'jkr'' in C:\xampp\www\jkr\core\connect.php:6
僅能作爲根出於某種原因... 還怎麼來的,我得到Access denied for user ''@'localhost'
?
JKR'@'%'是用戶名和= 127.0.0.1; dbname = jkr; charset = utf8「是jkr Schemaname –
你是什麼意思? – spelgubbe
對不起,我還沒看過所有 –