Creating Cloudera Manager Server database configuration file

The scm_prepare_database.sh script is used to create the configuration file for the Cloudera Manager Server database. This file contains the necessary settings for the connection between Cloudera Manager and the database.

The scm_prepare_database.sh script checks the connection between the Cloudera Manager server and the database, and upon successful connection, it generates the /etc/cloudera-scm-server/db.properties file. This file includes the required configurations for the database connection.
  1. Create the Cloudera Manager Server database configuration file. See Syntax for scm_prepare_database.sh.
  2. Upon successful connection, the scm_prepare_database.sh script writes the content of /etc/cloudera-scm-server/db.properties file as shown below:
    # Auto-generated by scm_prepare_database.sh on Tue Jun 13 07:22:02 UTC 2023
    #
    # 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=localhost
    com.cloudera.cmf.db.name=cm
    com.cloudera.cmf.db.user=cm
    com.cloudera.cmf.db.setupType=EXTERNAL
    com.cloudera.cmf.db.password=cm
    com.cloudera.cmf.orm.hibernate.connection.url=jdbc:mysql://localhost:3306/mysql?useSSL=true&sslMode=VERIFY_CA &trustCertificateKeyStoreUrl=file:///etc/cdep-ssl-conf/CA_STANDARD/truststore.jks&trustCertificateKeyStoreType=jks&trustCertificateKeyStorePassword=cloudera&enabledTLSProtocols=TLSv1.2
Restart the Cloudera Manager Server by running the following command:
sudo systemctl restart cloudera-scm-server