離線安裝CDH初始化資料庫的問題
當執行初始化資料庫指令碼語句:cm-5.13.0/share/cmf/schema/scm_prepare_database.sh mysql cm -hlocalhost -uroot -p123456 --scm-host localhost scm scm scm
之前,進入mysql:mysql -hlocalhost -uroot -p,執行一下sql語句,否則有可能報錯:
grant all privileges on *.* to 'root'@'localhost' identified by '123456' with grant option;
grant all privileges on *.* to 'root'@'hadoop1' identified by '123456' with grant option;
grant all privileges on *.* to 'root'@'127.0.0.1' identified by '123456' with grant option;
grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
grant all privileges on *.* to 'scm'@'localhost' identified by 'scm' with grant option;
grant all privileges on *.* to 'scm'@'hadoop1' identified by 'scm' with grant option;
grant all privileges on *.* to 'scm'@'127.0.0.1' identified by 'scm' with grant option;
grant all privileges on *.* to 'scm'@'%' identified by 'scm' with grant option;