更改密码
set password for 'root'@'localhost'=password('123456');
使用root在任意Ip登陆
mysql -u root -p
user mysql
grant all on *.* to admin@'%' identified by 'admin' with grant option;
设置任意Ip可连接
insert into mysql.user(Host,User,Password) values('%','admin',password('admin'));
grant all privileges on *.* to admin@% identified by 'admin';
flush privileges;