use mysql;
update user set host = '%' where user = '用户名'; (如果写成 host=localhost 那此用户就不具有远程访问权限)
flush privileges;
grant all privileges on *.* to 'myuser'@'%' identified by 'mypassword' with grant option;
use mysql;
update user set host = '%' where user = '用户名'; (如果写成 host=localhost 那此用户就不具有远程访问权限)
flush privileges;
grant all privileges on *.* to 'myuser'@'%' identified by 'mypassword' with grant option;