当前位置:Gxlcms > 数据库问题 > mysql报错 1142 - SELECT command denied to user 'root_ssm'@'localhost' for table 'user'(用户没有授权)

mysql报错 1142 - SELECT command denied to user 'root_ssm'@'localhost' for table 'user'(用户没有授权)

时间:2021-07-01 10:21:17 帮助过:5人阅读

技术图片

 

3、执行语句,查看用户的信息

技术图片

上图标红的地方的值为‘N’,表示没有权限,将其改为Y就行了。

技术图片

把所有值为‘N’的列改为‘Y‘,改好之后记得一定要重启服

二、使用Mysql的命令行客户端

看‘root_ssm‘用户的信息

 

use mysql;

 

select * from user where user=‘root_ssm‘;

 

  

 

修改root用户的localhost权限

根据查询结果中的列名,一个一个的写update语句修改

 

update user set Select_pri=‘Y‘ where user=‘root_ssm‘

全部改好后再刷新MySQL的系统权限相关表:

 

flush privileges;

 

之后重启mysql服务,权限就都有了。

 

mysql报错 1142 - SELECT command denied to user 'root_ssm'@'localhost' for table 'user'(用户没有授权)

标签:follow   sel   服务   size   相关   and   登陆   from   for   

人气教程排行