Supported Providers
MySQL
MySQL Provider is a provider used to query MySQL databases
Authentication
This provider requires authentication.
- username: MySQL username (required: True, sensitive: False)
- password: MySQL password (required: True, sensitive: True)
- host: MySQL hostname (required: True, sensitive: False)
- database: MySQL database name (required: False, sensitive: False)
- port: MySQL port (required: False, sensitive: False)
In workflows
This provider can be used in workflows.
As “step” to query data, example:
As “action” to make changes or update data, example:
Check the following workflow examples:
- blogpost.yml
- conditionally_run_if_ai_says_so.yaml
- create_alerts_from_mysql.yml
- raw_sql_query_datetime.yml
- simple_http_request_ntfy.yml
- slack-message-reaction.yml
Connecting with the Provider
In order to connect to the MySQL database, you will need to create a new user with the required permissions. Here’s how you can do this:
- Connect to the MySQL server as a user with sufficient privileges to create a new user.
- Run the following command to create a new user:
CREATE USER '<username>'@'<host>' IDENTIFIED BY '<password>'
; - Grant the necessary permissions to the new user by running the following command:
GRANT ALL PRIVILEGES ON <database>.* TO '<username>'@'<host>'
;