创建可以无主机限制的账号

create USER 'clibing'@'%' IDENTIFIED BY 'ty88yYMQH0udg1pC';

创建数据库

CREATE SCHEMA IF NOT EXISTS `clibing` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;

授权所有数据库权限

grant all on *.* to 'clibing'@'%';

撤销授权所有数据库权限

revoke all on *.* from 'clibing'@'%';

只授权对clibing数据库的所有权限

grant all on clibing.* to 'clibing'@'%';

只授权对clibing数据库的select权限

grant select on clibing.* to 'clibing'@'%'

修改密码

update user set password=password('123456') where user='root' and host='%';  
flush privileges;

SET PASSWORD FOR ‘root’@'%' = PASSWORD(‘111111’);