1.首先查看一下数据库的所有user以及host
其中需要远程连接则需要把host改为%
select user,host from mysql.user;
2.创建新用户test
create user 'test'@'%' identified by '123456';
其中需要远程连接则需要把host改为%
select user,host from mysql.user;
create user 'test'@'%' identified by '123456';