为Cloudera Manager建立数据库:/usr/share/cmf/schema/scm_prepare_database.sh mysql -h[mysql数据库的主机名] -P63751 -ugdp_root -p[password] --scm-host [cm server的主机名] [cm的数据库]
[cm数据库访问用户] [cm数据库访问用户的密码]
[[email protected] src]# /usr/share/cmf/schema/scm_prepare_database.sh mysql -h192.168.244.100 -P63751 -ugdp_root -pgdp_root --scm-host 192.168.244.100 cmdata cm cm;
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user ‘gdp_root‘@‘slave03‘ to database ‘cmdata‘
解决办法:
mysql> grant all on *.* to ‘gdp_root‘@‘slave03‘ identified by ‘gdp_root‘ with grant option;
#######################3
[[email protected] src]# /usr/share/cmf/schema/scm_prepare_database.sh mysql -h192.168.244.100 -P63751 -ugdp_root -pgdp_root --scm-host 192.168.244.100 cmdata cm cm;
JAVA_HOME=/usr/java/latest
Verifying that we can write to /etc/cloudera-scm-server
Creating SCM configuration file in /etc/cloudera-scm-server
Executing: /usr/java/latest/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/cmf/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.
[ main] DbCommandExecutor INFO Successfully connected to database.
All done, your SCM database is configured correctly!
用网页登录:192.168.244.100:7180
如果出现网页无法展示,查看下7180 端口是否起来,如果没有起来,数据库重启下。
[[email protected] ~]# lsof -i:7180
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 9567 cloudera-scm 241u IPv4 61346 0t0 TCP slave03:7180->192.168.244.1:53411 (ESTABLISHED)
java 9567 cloudera-scm 243u IPv4 61347 0t0 TCP slave03:7180->192.168.244.1:53412 (ESTABLISHED)
java 9567 cloudera-scm 252u IPv4 57436 0t0 TCP *:7180 (LISTEN)