1.我首先创建了一个hive用户然后执行create database hive报错如下
ERROR 1044 (42000): Access denied for user 'xuhive'@'%' to database 'hive'
2.上网查到权限不够退出当前用户到root用户下赋予hive权限
grant all on *.* to 'hive'@'%' identified by 'hive';
3.然后在执行
grant all on *.* to 'hive'@'localhost' identified by 'hive';
4.最后flush privileges;
5.重新切换hive用户下执行create database hive