Set up a database
You choose and set up a database to use as the metastore for Apache Druid (incubating).
As root, install a database, MySQL for example, on any node in your cluster.
On Centos 7.4, for example:
yum install https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm yum install mysql-community-server
Start the MySQL service.
systemctl start mysqld.service
Obtain the temporary password and change the password for the
root user. Do not use special characters in the password.
Ambari is compatible with most, but not all, special characters.
grep 'A temporary password is generated for root@localhost' \ /var/log/mysqld.log |tail -1 /usr/bin/mysql_secure_installation
On the database host, launch Mysql and create a user named druid with superuser
CREATE USER 'druid'@'%' IDENTIFIED BY '<DRUIDPASSWORD>'; GRANT ALL PRIVILEGES ON *.* TO 'druid'@'%’; GRANT ALL PRIVILEGES ON *.* TO 'druid'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;
Create a UTF8 database named druid.
CREATE DATABASE druid DEFAULT CHARACTER SET utf8;