MySQL
Give an agent read-only access to MySQL schemas and server metrics through the ilert MCP connector.
Required permissions
list_databases
SELECT
List all databases in the MySQL server. Useful for discovering available databases.
list_tables
SELECT
List all tables in a specific database. Useful for discovering available tables and their structure.
describe_table
SELECT
Get detailed schema information about a table including columns, data types, indexes, and constraints.
get_metrics
PROCESS, REPLICATION CLIENT
Get MySQL metrics in one call: InnoDB stats, current process list, replication status, connection counts, and lock information. Useful for diagnosing long-running queries, deadlocks, and replication lag.
Create MySQL user
Using the MySQL MCP server requires a MySQL user with specific read-only privileges. The connector performs the following operations:
SHOW DATABASES- List all databasesSHOW TABLES FROM <database>- List tables in a databaseDESCRIBE <database>.<table>- Get table schemaSHOW TABLE STATUS- Get table metadataSHOW STATUS/SHOW GLOBAL STATUS- Get MySQL status variablesSHOW VARIABLES/SHOW GLOBAL VARIABLES- Get MySQL configuration variablesSHOW PROCESSLIST- View current queries and connectionsSHOW SLAVE STATUS/SHOW MASTER STATUS- View replication statusSHOW ENGINE INNODB STATUS- View InnoDB status and lock information
Required Privileges:
The user needs the following privileges:
PROCESS - Required for
SHOW PROCESSLISTandSHOW ENGINE INNODB STATUSREPLICATION CLIENT - Required for
SHOW SLAVE STATUSandSHOW MASTER STATUSSELECT - Required for
SHOW DATABASES,SHOW TABLES,DESCRIBE, andSHOW TABLE STATUSon databases you want to query
Note: The following operations work WITHOUT additional privileges:
SHOW STATUS/SHOW GLOBAL STATUS- works for all usersSHOW VARIABLES/SHOW GLOBAL VARIABLES- works for all users
Important: SHOW DATABASES only shows databases that the user has privileges on. To see and query databases, you need to grant SELECT privilege on them.
Example SQL Script:
Security Note:
SELECTprivilege is read-only - the user cannot modify dataFor maximum security, grant SELECT only on specific databases you need to monitor
If you need to monitor all databases, use
GRANT SELECT ON *.*
Deploy the ilert MCP connector
ilert does not connect to your MySQL server directly. The MySQL MCP server calls the ilert MCP connector, a service you deploy in your own network and expose over a public HTTPS URL. Deployment, the auth token and all configuration options are on its own page:
Enable MySQL on the connector with these variables:
MYSQL_DATABASE only sets the default database for the connection — the agent addresses other databases by name, as long as the user has SELECT on them.
Connect MySQL with agent
To connect MySQL with your AI SRE agent:
Navigate to Agents in the ilert navigation menu
Open the agent detail view for the agent you want to configure
Go to the Tools tab
Under the ilert hosted MCP servers section, locate the MySQL card
Click Connect on the MySQL card
In the connection dialog that appears:
Select connector: Choose "Create new connector" (or select an existing connector if you have one)
Type: Select Bearer Token from the dropdown
Secret name: Enter a name for your connector (e.g., "MySQL Production" or "MySQL Main")
Secret value: Enter the
AUTH_TOKENvalue from your connector deploymentHost URL: Enter the public URL where your connector is reachable (e.g.,
https://ilert-mcp-connector.example.com)
Click Connect to complete the connection
After connecting, you can enable or disable specific tools needed for alert investigation, such as:
list_databases- List all databases in the MySQL serverlist_tables- List all tables in a specific databasedescribe_table- Get detailed schema information about a tableget_metrics- Get InnoDB stats, process list, replication status, connections, and locks
The MySQL integration is now connected and ready to use for root cause analysis.
Last updated
Was this helpful?