最近在部署hadoop,我发现了ambari工具部署hadoop的hive组件的一个问题,不知道其他人遇到过没有。
问题描述:通过ambari工具搭建了hadoop2.0完全分布式集群。在测试hive的时候,按照官方文档里的说明通过下面命令检查根目录的时候:总是报错无法连接mysql。(java.sql.SQLException: Access deniedforuser'hive'@'hdb3.yc.com'(using password: YES))
[root@hdb3 bin]# /usr/lib/hive/bin/metatool -listFSRoot
报错关键信息:14/02/20 13:21:09 WARN bonecp.BoneCPConfig: Max Connections < 1. Setting to 20
14/02/20 13:21:09 ERROR Datastore.Schema: Failed initialising database.
Unable to open a test connection to the given database. JDBC url = jdbc:mysql://hdb3.yc.com/hive?createDatabaseIfNotExist=true, username = hive. Terminating connection pool. Original Exception: ------
java.sql.SQLException: Access denied for user 'hive'@'hdb3.yc.com' (using password: YES)
从报错信息初步判断是没有权限访问mysql数据库。但是经过测试,利用hive用户,及密码连接mysql服务