#切换数据库
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;
#切换数据库
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;