MySQL

MySQL is the world's most popular open source database.

Using MySQL, you can trigger your Flow XO flows on:

  • New Row

And you can use the following MySQL actions in your Flow XO flow:

  • Add, Update, Get and Delete a Row
  • Run a Query

Connecting Your Account

You can connect Flow XO to MySQL by entering the following settings:

save image

Run a Query

For simple operations, you should use the add/update/get/delete row actions. However, you can run any kind of query against your database using this action.

To support the escaping of user input, you should separate the query from the data used in it. Provide the identifiers/values your query uses in the data field. You can reference a value from inside the query using a placeholder notation, either :value (for any user supplied value you need escaping) or #identifier (for any user supplied database/table/column name you want to use in a query).

For example:

More examples of queries using placeholders:

insert into posts (id, title) values (:id, :title)
select id, title from posts where id = :id
update posts set title = :title where id = :id
delete from posts where id = :id

An example of how to escape an identifier (the column name #requested_field):

select #requested_field from posts where id = :id

The output from this action is a data type output called 'Result'. Because it's a data output, you can use properties from inside it as inputs to other actions in your flows.

Here's a (curtailed) sample of the output from a select query:

{
  "rows": [
    {
      "id": 123,
      "title": "All the King's Men"
    }
  ],
  "fields": [
    {
      "catalog": "def",
      "db": "sql8123638",
      "table": "posts",
      "orgTable": "posts",
      "name": "id",
      ...
    },
    ...
  ]
}

FAQ

What things should I check if I have connection problems?

You should check that you database IP isn't restricted, that your database is listening on a public interface, and also perform a basic check of your username, password and SSL certificates.

Any question on using this service we haven't answered?  Contact us

Known Issues

  • MySQL doesn't give an error if you provide a string that is too long to a VARCHAR field, it just truncates your entry. So if the field length is 5 characters long, and you give a 10 character long input, you'll only get the first 5 characters in your MySQL field of the row you are creating. 
  • You can't currently work with the MySQL datatype 'binary' in Flow XO - Flow XO will ignore any columns that are of that datatype.

Let us know how we can improve Flow XO on our feedback site.

Still need help? Contact Us Contact Us