Why does my MySQL connection fail with ER_NOT_SUPPORTED_AUTH_MODE?
This error comes from the MySQL server, not from Adriel. MySQL 8 defaults new users to thecaching_sha2_password authentication plugin, which the connector cannot negotiate. The fix is on the database side: create or alter the Adriel user to use the mysql_native_password plugin instead.
A typical statement looks like this:
Which IPs do I need to whitelist, and why must my MySQL user’s host pattern allow them?
All queries reach the database through Adriel’s database proxy rather than from a rotating set of servers, so the database only needs to accept connections from the proxy’s egress address,52.79.160.224. Two things have to permit it: the network firewall (or the cloud provider’s security group) and the MySQL user account itself.
MySQL grants are scoped to a host pattern — the part after the @ in a user definition. A user defined as 'adriel_user'@'localhost' can only connect locally, so the proxy is refused even when the firewall is open. The account needs a host pattern that includes the proxy address, for example 'adriel_user'@'%' or a pattern that matches 52.79.160.224.
SELECT access is enough, since the connector only reads. Step-by-step connection setup lives in How to connect MySQL.
Why is my widget’s sort order ignored?
The MySQL connector does not apply sort settings to the generated query, so rows come back in whatever order the database returns them. This is expected behavior rather than a bug. When a specific order matters, the reliable approach is to bind a MySQL view that already returns rows in the wanted order, or to sort within the widget’s own display options where the widget type supports it.Why does a SUM over a text column return 0?
Every field placed in a metric slot is aggregated withSUM(). When that field maps to a text column, MySQL evaluates the sum of non-numeric text as 0. Column roles are decided by the MySQL native type: integer, float, double, decimal, and bit types map to Number; date, time, and year types map to Date; everything else maps to Text.
The fix is to match the column to its role. Numeric columns belong in metric slots, and text columns work as breakdowns for grouping. To count records rather than sum a value, use the built-in Row count field, which resolves to a COUNT(*). Full type-mapping rules are in the MySQL data reference.
Why don’t columns I just added to my table show up?
The connector memoizes each table’s column list, so a newly added column is not visible the instant it is created in MySQL — it appears once the field-metadata cache next refreshes. This affects only which columns are selectable; row values are read live on every widget load and are never cached. For the exact caching schedule, see the MySQL data reference.How do I filter with LIKE or a range, or combine two tables?
Widget filters on MySQL data sources support theIN operator (including its negation) only; other operators are not available. One Adriel data source also binds to exactly one table, so multi-table joins are not done inside the widget. Both cases are handled the same way — with a MySQL view:
- For richer filtering (
LIKE, numeric or date ranges, regular expressions), define a view that applies the predicate, then bind the view as the data source. - For data spanning multiple tables, pre-join the tables into a view and bind that view.
Related
How to connect MySQL
Credentials, IP whitelisting, and connection setup for a MySQL or MariaDB database.
MySQL data reference
Query model, field type mapping, caching, and limits for the MySQL data source.
MongoDB data reference
The sibling database connector, with a form-driven column pre-filter.
Refresh strategies
How Adriel data sources fetch and refresh data across connectors.
