mysql –uroot –p mysql
use mysql; sql
UPDATE user SET `Host` = '%' WHERE `User` = 'root' LIMIT 1; spa
flush privileges; 配置
记得配置3306端口外网可访问。权限