mysql8.0创建新用户
查看当前用户
use mysql;
select current_user();
或者:
select User, authentication_string , Host from user;
查看权限
show grants for 'user'@'ip';
或者
show grants;
创建一个给新用户的数据库
create database testDatabase;
创建新用户同时配置给该用户testDatabase的所有权限
create user testUser@'%' identified by 'Password@12345678';
grant all privileges on testDatabase.* to testUser@'%' with grant option;
flush privileges;