首页 > 数据库技术 > 详细

mysql授权修改密码

时间:2019-10-12 10:12:31      阅读:98      评论:0      收藏:0      [点我收藏+]
mysql 更改密码
update mysql.user set authentication_string=password(‘123456‘) where user=‘root‘;
提示报错密码长度问题
mysql> set global validate_password_policy=0;
mysql> set global validate_password_length=1;

mysql授权
授权用户所有权限
grant all on . to ‘用户‘@"%" identified by "密码";
grant alter,insert,select,delete,update,create,drop on . to ‘用户‘@"%" identified by "密码";
FLUSH PRIVILEGES;

grant update,insert,select,create,DELETE on nad.* to ‘svsadmin‘@"%";

授权查询权限
grant select on . to 用户@"%" identified by "密码";
撤销drop权限
revoke drop on . from ‘用户‘@"%";

mysql查看用户列表
mysql> select host,user from mysql.user;

查询授权用户权限
show grants for 用户名;
删除账户及权限
drop user 用户名@‘%‘;

mysql授权修改密码

原文:https://blog.51cto.com/13293070/2441460

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!