Overview
MySQL lets a cloud flow read and change rows in your own MySQL or MariaDB database. It runs on Automize's servers, not on a bot, so the database must be reachable from the internet.
- Regions: Any MySQL or MariaDB server reachable from the internet over TLS: Amazon RDS, Azure, Google Cloud SQL, PlanetScale, or your own.
- Plans: Cloud flows only. The bot has no MySQL connector yet.
Setting up the connection
Auth type: HTTP Basic.
- Make a database user for Automize with only the rights the flows need, e.g. SELECT on the tables they read.
- Let the database accept connections from the internet on its port (usually 3306). On AWS, Azure and Google Cloud this is a firewall or security group rule.
- In Automize, open Settings → Connectors → MySQL → Add connection.
- Enter the server name, the database, the user and its password. Leave Port blank for 3306.
- Leave Encryption on Require, or choose Verify the certificate when the server has a certificate from a public authority. MySQL is told the server name for that check, so it looks the name up again to connect.
Rate limits
Each statement stops after 30 seconds. A step brings back at most 5000 rows and says so when it cut the answer.
Data model
Database ─── Schema ─── Table ─── Rows
Where: {"status": "open", "customer_id": 42} every pair must match
{"status": ["open", "late"]} any of these
{"paid_at": null} empty (NULL)Available operations
6 operations available. Click any row to jump to its detail.
| Operation | Category | What it does |
|---|---|---|
| Delete rows | General | Delete the rows that match Where. Where cannot be empty, so a step can never empty the whole table by mistake. |
| Run a statement | General | Run a statement that changes data (INSERT, UPDATE, DELETE, or a stored procedure) and get how many rows it changed. |
| Insert rows | General | Add one row, or a list of rows (up to 1000), to a table. The id of the first new row comes back. |
| Run a query | General | Run a SELECT (or any query that returns rows) and get the rows back. Values go in Parameters, never into the SQL text. At most 5000 rows come back. |
| Find rows | General | Read the rows of a table that match Where, without writing SQL. |
| Update rows | General | Change the rows that match Where. Where cannot be empty, so a step can never change the whole table by mistake. |
Operations
Delete rows
Delete the rows that match Where. Where cannot be empty, so a step can never empty the whole table by mistake.
| Parameter | Required | Type | Description |
|---|---|---|---|
Table table | Yes | text | The table, e.g. invoices. Add the schema in front if it has one ("sales.invoices"). |
Where where | Yes | object | Which rows: an object of column and value, e.g. {"status": "open", "customer_id": 42}. Every pair must match. A null value matches empty (NULL) cells. |
Tips
- Where cannot be empty, so a step never empties the whole table.
Run a statement
Run a statement that changes data (INSERT, UPDATE, DELETE, or a stored procedure) and get how many rows it changed.
| Parameter | Required | Type | Description |
|---|---|---|---|
SQL sql | Yes | textarea | The statement. Put ? where a value goes. |
Parameters params | No | list | Values for each ? in the SQL, in order: a list such as ["paid", 100]. |
Tips
- Gives back affectedRows: how many rows changed.
Insert rows
Add one row, or a list of rows (up to 1000), to a table. The id of the first new row comes back.
| Parameter | Required | Type | Description |
|---|---|---|---|
Table table | Yes | text | The table, e.g. invoices. Add the schema in front if it has one ("sales.invoices"). |
Row or rows rows | Yes | object | One row as an object of column and value, e.g. {"name": "Ann", "total": 100}, or a list of such objects. Every row needs the same columns. |
Tips
- The id of the first new row comes back as lastInsertId.
Run a query
Run a SELECT (or any query that returns rows) and get the rows back. Values go in Parameters, never into the SQL text. At most 5000 rows come back.
| Parameter | Required | Type | Description |
|---|---|---|---|
SQL sql | Yes | textarea | The query. Put ? where a value goes. |
Parameters params | No | list | Values for each ? in the SQL, in order: a list such as ["paid", 100]. |
Tips
- Put ? in the SQL and the values in Parameters, in order. Never write a value into the SQL.
Find rows
Read the rows of a table that match Where, without writing SQL.
| Parameter | Required | Type | Description |
|---|---|---|---|
Table table | Yes | text | The table, e.g. invoices. Add the schema in front if it has one ("sales.invoices"). |
Where where | No | object | Which rows: an object of column and value, e.g. {"status": "open", "customer_id": 42}. Every pair must match. A null value matches empty (NULL) cells. Leave empty for every row. |
Columns columns | No | text | The columns to return, separated by commas. Leave empty for all. |
Sort by orderBy | No | text | Column to sort by, with "desc" for largest first, e.g. "created_at desc". Separate several with commas. |
Limit limit | No | number | Most rows to return. Default 100, at most 5000. |
Tips
- Default limit 100, at most 5000.
Update rows
Change the rows that match Where. Where cannot be empty, so a step can never change the whole table by mistake.
| Parameter | Required | Type | Description |
|---|---|---|---|
Table table | Yes | text | The table, e.g. invoices. Add the schema in front if it has one ("sales.invoices"). |
New values values | Yes | object | An object of column and new value, e.g. {"status": "paid"}. |
Where where | Yes | object | Which rows: an object of column and value, e.g. {"status": "open", "customer_id": 42}. Every pair must match. A null value matches empty (NULL) cells. |
Tips
- Where cannot be empty, so a step never changes the whole table.
FAQ
- Is the password safe?
- It is stored encrypted and only sent to your server over an encrypted connection. There is no way to connect without encryption.
- Can a step change a table it should not?
- It can do whatever the database user may do. Give that user only the rights the flows need.