Adding Druid to a cluster
Also available as:
PDF

Set up MySQL for Apache Druid

If you chose MySQL as the metadata store for Apache Druid (incubating) during the installation, you must set up the MySQL connector and follow a few steps to configure the database.

  1. On the Ambari server host, run the command to set up the connector:
    ambari-server setup --jdbc-db=mysql --jdbc-driver=/path/to/mysql/mysql-connector-java.jar
  2. Create a Druid database by executing the following command, replacing <DRUIDDATABASE> with the Druid database name.
    # mysql -u root -p
    CREATE DATABASE <DRUIDDATABASE> DEFAULT CHARACTER
    SET utf8;                   
  3. On the mysql command line, create a Druid user with sufficient superuser permissions:
    CREATE USER '<DRUIDUSER>'@'%' IDENTIFIED BY '<DRUIDPASSWORD>';
    GRANT ALL PRIVILEGES ON <DRUIDDATABASE>.* TO '<DRUIDUSER>'@'%’;
    FLUSH PRIVILEGES;