一个mysql server权限的坑

1、远程访问数据库服务器的时候,提示java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

2、我以为是没有权限

3、然后再服务端去配置权限 grant all privileges on *.* to 'root'@'localhost' identified by '密码';然后服务端就提示我:cannot load mysql.user,This table probably corrupted

4、然后一直找原因 select * from mysql.user where user='root'\G;

所有的权限都有,然后找资料的时候发现有人说可能是账号密码有空格,我检查的时候发现我的密码是错的

查了好久,心酸

猜你喜欢

转载自blog.csdn.net/weixin_42172231/article/details/85291054
今日推荐