cdh Specified key 太长问题解决

"create table CREDENTIALS (
    CREDENTIAL_ID bigint not null,
    PRINCIPAL varchar(255) not null unique,
    KEYTAB mediumblob not null,
    primary key (CREDENTIAL_ID)
) engine=InnoDB"
Specified key was too long; max key length is 767 bytes

为了 这个错误差点安装了一个mysql 5.7 ,但是安5.7实在是太麻烦,用心搜了一段之后,在overflow上见到了这个,

CREATE DATABASE <YOUR_DATABAE_NAME> DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; 

另 cdh 5.10以上要求配置外置数据库,配置文件在 /etc/cloudera-scm-server/db.properties, 配置内容为:

# Auto-generated by scm_prepare_database.sh on Fri Oct 20 15:09:50 CST 2017
#
# For information describing how to configure the Cloudera Manager Server
# to connect to databases, see the "Cloudera Manager Installation Guide."
#
com.cloudera.cmf.db.type=mysql
com.cloudera.cmf.db.host=100.73.13.5
com.cloudera.cmf.db.name=cdh
com.cloudera.cmf.db.user=myroot
com.cloudera.cmf.db.setupType=EMBEDDED
#com.cloudera.cmf.db.setupType=EXTERNAL
com.cloudera.cmf.db.password=Hsql1234

Leave a comment

Your email address will not be published.

*