This integration supports self-managed MySQL 8, Percona Server 8, and MariaDB 10.4 or later, Google Cloud SQL for MySQL, Amazon RDS for MySQL and MariaDB, Aurora MySQL 3, and Azure Database for MySQL Flexible Server. Pick the setup path that matches your deployment below.
What Oleria discovers
Prerequisites
- A MySQL or MariaDB account with permission to create users and grant privileges, to create the account Oleria uses.
- A network path from Oleria to your database on its port (default
3306). Google Cloud SQL is the exception: Oleria connects through the Cloud SQL connector, so you don’t need to open a network path. Servers on a private network that Oleria can’t reach aren’t supported yet. - Cloud-provider credentials matching your deployment - see Set up the integration below.
- Optional: extra privileges on the same account, if you also want to run remediation actions. See Remediation actions.
Oleria reads accounts and grants from the
mysql system schema, so its account needs SELECT on mysql.*. That also lets the account read password hashes. Oleria never reads them, but MySQL has no narrower grant that shows other accounts’ privileges. Never share this account with a person: on the cloud deployments, Oleria excludes its own activity by account name alone.Set up the integration
Create a dedicated account for Oleria on every deployment. Run this as an administrator (root, or your cloud provider’s admin or master user):
SELECT ON mysql.*shows accounts, grants, and roles.SHOW DATABASESandSHOW VIEWare required, and so isSHOW_ROUTINEon MySQL 8.0.20 and later.PROCESSis recommended. It lets Oleria see sessions and tell its own session apart. Without it the connection works, but Disable user accounts can’t end sessions.- On MariaDB, leave out
SHOW_ROUTINE, which doesn’t exist there.SELECTonmysql.*already covers routines, so you don’t need globalSELECT. On MySQL before 8.0.20, which also has noSHOW_ROUTINE, routines and definer impersonation are skipped with a warning unless the account has globalSELECT.
TRIGGERandEVENTlet Oleria see trigger and event definers. Without them, triggers and events are skipped. Both privileges can also change data, so grant them only if you want that coverage.REPLICATION CLIENTlets Oleria label replication topology.
If you give these privileges through a role, make it a default role of the account, or turn on
activate_all_roles_on_login. Otherwise MySQL doesn’t apply them when Oleria connects.- Self-managed
- Google Cloud SQL
- Amazon RDS / Aurora
- Azure Flexible Server
1
Create the account
Run the statements above as
root. Oleria recommends TLS, so make sure your server has a certificate. If you set TLS Mode to Disabled (not recommended), create the account without REQUIRE SSL, because the server refuses a plain connection for that account.2
Enable an audit log for activity (optional)
Oleria reads activity over the same connection, and uses the first of these your server offers:
- MySQL Enterprise Audit or Percona’s audit log filter, with the log format set to JSON (the
audit_log_formatoraudit_log_filter.formatsetting, depending on your product and version). Oleria reads it withaudit_log_read(). The format is set at startup. A newly installed audit plugin logs nothing until you assign a filter, so also run:
- The general query log as a table. Run
SET GLOBAL log_output = 'TABLE'; SET GLOBAL general_log = 'ON';, and set the same values in your configuration file so they survive a restart. This works on MySQL, Percona, and MariaDB.
MySQL’s documentation doesn’t say which privilege
audit_log_read() needs. If activity doesn’t appear on MySQL Enterprise, check whether the account also needs AUDIT_ADMIN.Connect MySQL to Oleria
1
Open the integration
Sign in to your Oleria workspace and navigate to Integrations -> MySQL -> Connect.
2
Complete the connection form
Select your Deployment first. The form updates to show only the fields that deployment needs.On every deployment, turn on Advanced settings to set two optional fields:
- Self-managed
- Google Cloud SQL
- Amazon RDS / Aurora
- Azure Flexible Server
3
Complete the connection
Select Authenticate. Oleria validates the connection and its privileges, discovers your accounts, roles, resources, and access, and begins the first sync.
Verify the integration
Confirm MySQL appears on the Connected tab of your Oleria Integrations page. After the first sync completes, you can review the discovered accounts, roles, resources, access grants, and activity in your Oleria workspace. If the connection is refused with an error that names a missing privilege, grant it to the account and try again.Remediation actions
Oleria runs remediation actions with the same account it syncs with, so grant that account the extra privileges below if you want to use them. The Capabilities tab on the integration’s page shows which actions are available, and which need a privilege.Without a way to end sessions, Disable user accounts still locks the account, but sessions that are already open stay open until they end. On Amazon RDS and Azure, the administrator can’t grant
CONNECTION_ADMIN, so grant EXECUTE on the kill procedure instead.Every action reads before it writes. If the account is already in the target state, Oleria changes nothing, and its undo changes nothing either. Oleria never changes its own account, provider-managed accounts, administrator accounts, anything in Protected Accounts, or mandatory roles, and it refuses a target that matches more than one account.
Known limitations
- No creation date or last sign-in: MySQL stores neither, so Oleria shows dormancy only from activity in the audit log.
- No account creation or deletion: Oleria locks and unlocks accounts, changes role membership, and revokes privileges. It can’t create or delete an account or grant a privilege.
- Groups: MySQL has no groups. Oleria shows LDAP group mappings, and group membership comes from your directory integrations.
- Cloud administrators aren’t visible over SQL: People who can reset the administrator password through your cloud provider (for example,
cloudsql.users.updateon Google Cloud,rds:ModifyDBInstanceon AWS, or the Contributor role on Azure), and anyone with operating system access, don’t appear in the database. Oleria models them on the instance. - Statement text is redacted: Oleria replaces literal values, long numbers, emails, and comments in audited statements with
<redacted>, and keeps the statement’s shape. - Self-managed activity: A self-managed server with no audit plugin, no general log table, and no JSON audit log shows no activity. A MariaDB audit plugin that writes only to a file isn’t read.
- Activity history: Oleria backfills about six months, but each source holds only what its retention keeps: since you turned on export for RDS and Aurora (unless you set a log group retention), 30 days by default on Google Cloud SQL and Azure, and what is still on disk or in the log table for self-managed servers. Oleria can’t show events older than that.
- Activity gaps by source: Google Cloud SQL doesn’t list role grants or revokes among the operations its audit plugin logs. On Azure,
CONNECTION_V2records the result of each login. Without it, a refused login looks like a successful one. The general log has no success or failure flag. - Private networks: Oleria can’t reach a server that is only on a private network. Google Cloud SQL connects through the Cloud SQL connector, which uses the instance’s public IP.

