MySQL Module (Advanced Query) is not really working

Hey so the MySQL modules, are kind of weird for me, I am using Execute a query (advanced)

So I have a connection and at time when I create a query in the MySQL module it works fine but other times I get the below query

Failed to refresh metadata. You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘​’ at line 4

So for example the below query give the above error

FROM db.sample
WHERE x = 1;

What is really weird is if I remove the WHERE it starts working. But then other queries have the WHERE and work fine, sometimes I get the above error when I have GROUP BY or ORDER BY, other times I don’t, It just seems random which queries work & don’t. Anyone else have issues with using the MySQL module and anyone find a fix or workaround?

I found a fix that helped me being extremely careful with white spaces any white lines at the end of the query will causes everything to fail.

But in general it is still a bit inconsistent like for example I have exact same query that works in one module but when copied over I get a table not found metadata error. The query syntax is correct, it just can be a bit frustrating getting the query to work with this module


Hi @Alex_Hitchon ,

Your remark regarding empty lines is very relevant.
Likewise, there may be a similar trick for trailing spaces…