利用下面的命令为mysql建立远程访问账号:
grant all privileges on *.* to joe@”%” identified by ‘passwd’ with grant option
如果这里的%换为ip后授权账号将只对该ip有效