MySql设置远程登录-1130:Host ... is not allowed to connect to this MySQL server
需求:在使用Sqoop的时候需要从Linux服务器远程登录到Windows的MySql数据库,进行数据迁移时。
1、使用命令登录mysql数据库
mysql -uroot -p123456
2、mysql默认是不允许远程连接的,修改为可以使用远程连接
grant all on *.* to 'root'@'%' identified by '123456';
3、刷新权限表使远程连接生效
flush privileges;