1.创建用户
create user 'test'@'%' identified with mysql_native_password by '123456';
2.指定限制访问的库grant all privileges on dbname.* to 'test'@'%' with grant option;
3.刷新权限flush privileges;