mysql的root用户无法给普通用户授权问题处理

1、查看Grant_priv是Y还是N


执行下面

select * from mysql.user where User='root' and Host='%'G; 

下图查看结果为Grant_priv是Y,如果是N,执行下面

update mysql.user set Grant_priv='Y' where User='root' and Host='%';

flush privileges;(刷新权限)

问题解决


update mysql.user set Grant_priv='Y' where User='root' and Host='%';


flush privileges;(刷新权限)


2、验证:给普通用户授权:

执行以下命令进行授权:

create user 'ceshi'@'192.168.42.67' identified by 'jenkins_666';
grant all privileges on *.* to 'ceshi'@'192.168.43.135';


flush privileges;(刷新权限)


2、修改密码


root 账号的密码和创建 YDB-MySQL 时指定的密码完全相同, 如果需要,同样可以用 root 账号连接到 MySQL server,

 然后使用 SET PASSWORD 命令来修改。


mysql> SET PASSWORD FOR 'root'@'%' = PASSWORD('new-root-passwd');
Query OK, 0 rows affected (0.00 sec)

参照连接:

博客:
http://blog.itpub.net/28497416/viewspace-2132403/

银盾的官方文档:http://www.sspaas.com/secondary/file/apicenter.html?&&549

原文地址:https://www.cnblogs.com/effortsing/p/10011143.html