我试图启动我的应用程序但最终收到此错误消息
{"对主机进行身份验证''对于用户' root'使用方法' mysql_native_password'消息失败:用户访问被拒绝' root' DESKTOP-4TLD649' (使用密码:是)"}
我试过打字
GRANT ALL PRIVILEGES ON . TO root@'%' IDENTIFIED BY 'root';
但它对我不起作用。我刚收到语法错误
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TO root@'%' IDENTIFIED BY 'root'' at line 1
答案 0 :(得分:0)
在databasename.tablename上授予所有特权到'root'@'%'由'root'识别;