hive初始化报错Host ‘Master001‘ is not allowed to connect to this MySQL server

hive在初始化时出现错误

Underlying cause: java.sql.SQLException : null,  message from server: "Host 'Master001' is not allowed to connect to this MySQL server"
SQL Error code: 1130

错误原因在网上搜索了发现是服务器不允许远程访问,修改配置让其支持远程访问
先进入mysql,回车输入密码

mysql -u root -p 

查看host内容

select host from user;

然后更新权限就可以了

update user set host ='%' where user ='root';

再重新启动mysql

service mysqld stop;
service mysqld start;

hive初始化成功!

schematool -dbType mysql -initSchema

hive初始化报错Host ‘Master001‘ is not allowed to connect to this MySQL server_第1张图片
在这里插入图片描述

你可能感兴趣的:(Vmware学习,hive,mysql,数据库)