You can integrate with MySQL in a few steps.
Follow these steps:

  • Create a read-only user
  • Grant it the permissions required for Sifflet to operate
  • Connect to Sifflet

1- Create a read-only user

To create the read-only user, you will need to run the following SQL query.
Please choose a "username" (for instance, sifflet_read_only_user) and a secure password. Store them carefully as you will need them to connect to Sifflet later.

-- Create a new user with read-only privileges
CREATE USER 'sifflet_read_only_user'@'%' IDENTIFIED BY 'password';

2- Grant the permissions

You can now assign the permissions to the newly created user ("sifflet_read_only_role" in this example).

  • Don't forget to replace database_namewith the actual name.
  • We use the % symbol after the user sifflet_read_only_user to allow the user to connect from any host. You can replace this with a specific IP address or hostname if you want to restrict the user's access to a specific machine.
-- Grant the user access to the database schema
GRANT USAGE,SELECT, SHOW VIEW ON 'database_name'.* TO 'sifflet_read_only_user'@'%';


3- Connect to Sifflet

To connect to MySQL on Sifflet, you will need the following:

  • the connection details: your Host, Port, Database, and Schema
  • the secret which corresponds to the username and password you previously chose.

Create a secret in Siffet

To create the MySQL secret, follow the below steps:

  • In "Integration" --> submenu "Secrets", create a new secret
  • In the "Secret" area, copy-paste the below text and replace it with the correct username and password previously created in part 1:
  "user": "sifflet_read_only_user",
  "password": "password"

Add the datasource

You can refer to this page on adding a data source in Sifflet for more detailed information.

  • In Integration --> click on "+ New"
  • Fill out the necessary information collected above