CREATE USER 'test'@'%' IDENTIFIED BY '15ht46389012t'; #'%' - 全部状况都能访问;‘localhost’ - 本机才能访问;’192.168.1.2‘ - 指定 ip 才能访问
grant all privileges on 想受权的数据库.* to 'test'@'%'; flush privileges;
all 能够替换为 select,delete,update,create,drop。数据库