mac環(huán)境下安裝hive

本文主要講述在mac環(huán)境下安裝hive,目標讀者為大數(shù)據(jù)初學者或者有意進入大數(shù)據(jù)行業(yè)的研發(fā)人員。

閱讀本文前請先閱讀《mac環(huán)境下hadoop安裝》



需要先安裝mysql ,https://dev.mysql.com/downloads/file/?id=471631

mysql密碼重置

1) /usr/lcoal/mysql/bin/mysql.server stop

2)/usr/local/mysql/bin/mysqld_safe --skip-grant-tables

3)打開另一個終端:?/usr/local/mysql/bin/mysql -u root

UPDATE mysql.user SET authentication_string=PASSWORD('新密碼') WHERE User='root';

FLUSH PRIVILEGES;

\q

至此,密碼修改成功

進入/usr/local/Cellar/hive/2.1.1/bin

schematool -initSchema -dbType mysql? (一定要執(zhí)行,不然會出現(xiàn)錯誤)

如果出現(xiàn)錯誤,需要我們檢查目錄下是否已經(jīng)有,metastore_db這個目錄,如果有,那么就刪掉后重新執(zhí)行初始化命令。我的問題就是這個原因導致的。

進入mysql客戶端會看到生成了很多hive的表

接下來 執(zhí)行hive,看到hive命令行,表示成功

使用Squirrel SQL 連接hive

這里的坑比較多

首先下載squirrel SQL 自己百度

下載后配置driver:


出現(xiàn): xxx is notallowed to impersonate root

把下邊的root改為xxx

hadoop.proxyuser.root.groups

root

Allow the superuser oozie to impersonate any members of the group group1 and group2

hadoop.proxyuser.root.hosts

localhost

The superuser can connect only from host1 and host2 to impersonate a user

出現(xiàn):Name node is in safe mode

hadoop dfsadmin -safemode leave

最后編輯于
?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容