TiDB建库建用户及授权

2021-04-25 15:25:29 浏览数 (1)

TiDB建库授权

先把密码长度改短

代码语言:javascript复制
set global validate_password_length=3;

给root授权远程访问

代码语言:javascript复制
ALTER USER 'root'@'%' IDENTIFIED BY 'Umta&152'; grant all privileges on *.* to 'root'@'%' identified by 'Umta&152';

svc添加svc用户和相关权限

代码语言:javascript复制
#建
CREATE USER 'svc'@'localhost' IDENTIFIED BY 'Abc*231'; #建 CREATE USER 'svc'@'%' IDENTIFIED BY 'Abc*231';

授权

代码语言:javascript复制
grant all privileges on svc.* to 'svc'@'localhost' identified by 'Abc*231';
grant all privileges on svc.* to 'svc'@'%' identified by 'Abc*231';

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/100367.html原文链接:

0 人点赞