1. 程式人生 > >部署CM報錯(5):hive配置連線mysql報錯:Able to find the Database server, but not the specified database.

部署CM報錯(5):hive配置連線mysql報錯:Able to find the Database server, but not the specified database.

1.問題描述

主機無法連線mysql資料庫,連線報錯

Able to find the Database server, but not the specified database. Please check if the database name is correct and make sure that the user can access the database.

2.問題原因

hadoop的mysql資料庫,沒有hive資料庫,以及使用者名稱和密碼

3.解決辦法

在hadoop中建立hive資料庫,以及對應使用者名稱root,和密碼123456.

(1)主節點server上(mysql資料庫節點)

cd /opt/cloudera-manager/cm-5.10.2/share/cmf/schema

(2)建立hive資料庫

./scm_prepare_database.sh mysql -h hadoop -ucm -pcm --scm-host hadoop hive root 123456

(3)重新測試連線