mysql8 新增用户

#切换数据库
use mysql;
#查询用户
select host,user,plugin from mysql.user;
#创建新用户、密码
create user 'Test'@'%' identified with mysql_native_password by 'Test@123456';

#授权
grant all privileges on 数据库名称.* to Test;

#查看用户权限
show grants for Test;

posted @ 2021-05-19 16:32  许宝  阅读(206)  评论(0编辑  收藏  举报