MySQL Metadata Store

    This extension can use Oracle’s MySQL JDBC driver which is not included in the Druid distribution. You must install it separately. There are a few ways to obtain this library:

    This fetches the MySQL connector JAR file with a name like mysql-connector-java-5.1.49.jar.

    Copy or symlink this file inside the folder extensions/mysql-metadata-storage under the distribution root directory.

    This extension also supports using the MariaDB connector jar, though it is also not included in the Druid distribution, so you must install it separately.

    Copy or symlink this file to extensions/mysql-metadata-storage under the distribution root directory.

    To configure the mysql-metadata-storage extension to use the MariaDB connector library instead of MySQL, set druid.metadata.mysql.driver.driverClassName=org.mariadb.jdbc.Driver.

    Depending on the MariaDB client library version, the connector supports both jdbc:mysql: and connection URIs. However, the parameters to configure the connection vary between implementations, so be sure to for details.

    1. Install MySQL

    Use your favorite package manager to install mysql, e.g.:

    • on Ubuntu/Debian using apt apt-get install mysql-server
    • on OS X, using brew install mysql

    Alternatively, download and follow installation instructions for MySQL Community Server here: http://dev.mysql.com/downloads/mysql/.

    Connect to MySQL from the machine where it is installed.

    Paste the following snippet into the mysql prompt:

    1. Configure your Druid metadata storage extension:

    Add the following parameters to your Druid configuration, replacing <host> with the location (host name and port) of the database.

    If using the MariaDB connector library, set druid.metadata.mysql.driver.driverClassName=org.mariadb.jdbc.Driver.

    This extension provides support for encrypting MySQL connections. To get more information about encrypting MySQL connections using TLS/SSL in general, please refer to this guide.