hive启动metastore报错:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user ‘root’@‘node03’ to database ‘hive’
错误原因如下:
解决步骤:
首先进入msql命令行
- msql -uroot -p*********
执行如下操作:
注意这句要根据自己的数据库名活用:grant all on 数据库.* to ‘用户名’@’%’ identified by ‘密码’ with grant option;
mysql> grant all privileges on *hive* to 'root'@'%' identified by '123456' with grant option; ERROR 1046 (3D000): No database selected mysql> grant all privileges on hive.* to 'root'@'%' identified by '123456' with grant option; ERROR 1819 (HY000): Your password does not satisfy the current policy requirements mysql> set global validate_password_policy=LOW; Query OK, 0 rows affected (0.00 sec) mysql> set global validate_password_length=6; Query OK, 0 rows affected (0.00 sec) mysql> grant all privileges on hive.* to 'root'@'%' identified by '123456' with grant option; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> exit
然后重启mysql
sudo service mysqld restart
开启metastore即可正常启动了
bin/hive --service metastore &