CDH problem summary-Tables have unsupported engine type [xxx]. InnoDB is required.

table of Contents

1. Problem description

1.1 The error message I encountered

Server failed to start, always reporting errors:

ERROR main:com.cloudera.server.cmf.bootstrap.EntityManagerFactoryBean: Tables have unsupported engine type [null]. InnoDB is required. Table mapping: ........................

1.2 Summarize this type of error message

It can be summarized as such error message

Tables have unsupported engine type [xxx]. InnoDB is required.

2. Solution

2.1 View log

cat /var/log/cloudera-scm-server/cloudera-scm-server.log

Insert picture description here

2.2 Resolution

(1) Modify the configuration file

Analyzing the log, it is found that the database requires INNODB, but it will not work if other engines are used.
Therefore, just add a line of configuration to the configuration file.

vim /etc/my.cnf

[mysqld]
default-storage-engine=INNODB
...

Restart MySQL service after modification service mysqld restart

(2) Database backup (be sure to back up the relevant database)

(3) Reinitialize the CM library

After the database is backed up, delete the database, re-complete a series of initialization operations such as building the database and assigning permissions, and then restart (restart is not necessary, there is a bug in CDH6, if you find that there is nothing in MySQL after initializing the CM library, just complete it again In this series of operations, delete the library and add the restart operation)
Here, note that the CDH version is different, and the reset method is also different. I used CDH6 here.

# CDH6
/opt/cloudera/cm/schema/scm_prepare_database.sh mysql cmf cmf
# CDH5
/usr/share/cmf/schema/scm_prepare_database.sh mysql cm -h127.0.0.1 -uroot -ppasswd --scm-host 127.0.0.1 scm scm scm

(4) Restore the backup data

(5) Restart the CM service

service cloudera-scm-server start