给root用户授予远程登陆权限:
grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;
给被连接的数据库(lucky)授予远程登陆的权限:
GRANT ALL ON lucky.* TO 'root'@'%';
权限刷新:
FLUSH PRIVILEGES;
说明:如果连接发生错误要关闭服务器防火墙
给root用户授予远程登陆权限:
grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;
给被连接的数据库(lucky)授予远程登陆的权限:
GRANT ALL ON lucky.* TO 'root'@'%';
权限刷新:
FLUSH PRIVILEGES;
说明:如果连接发生错误要关闭服务器防火墙