Supported platforms
Prerequisites
- A MySQL instance reachable from CloudThinker over the network.
- Admin or root access to create a dedicated user and grant privileges.
- Performance Schema enabled (default in MySQL 5.7+; verify before connecting).
Setup
1
Connect as root
Connect to MySQL as root or admin user:
2
Create a read-only user
Create the CloudThinker user:
3
Grant read permissions
Grant SELECT and monitoring privileges:
4
Grant Performance Schema access
Required for query analysis:
5
Verify Performance Schema is enabled
my.cnf and restart:6
Configure network access
Ensure CloudThinker can reach your database:
- Add CloudThinker IPs to your security group or firewall
- For RDS: enable public access or use VPC peering
7
Add the connection in CloudThinker
Navigate to Connections → MySQL and enter:
- Host: your database hostname or IP
- Port: database port (default:
3306) - Database: database name
- Username:
cloudthinker_readonly - Password: the password you set above
- SSL: enabled (recommended)
Connection details
Connection string format:
Required permissions
Minimum
Recommended (full analysis)
Agent capabilities
Once connected, Tony can:Verify the connection
Example prompts
Troubleshooting
Connection refused
Connection refused
- Verify host and port are correct
- Check your security group or firewall allows CloudThinker IPs
- For RDS: ensure “Publicly accessible” is enabled or use VPC peering
- Confirm MySQL is listening on the correct interface (
bind-addressinmy.cnf)
Access denied
Access denied
- Verify username and password are correct
- Check the user has the correct host specification (
'user'@'%'vs'user'@'localhost') - Ensure
GRANTstatements were followed byFLUSH PRIVILEGES
Performance Schema disabled
Performance Schema disabled
- Check with:
SHOW VARIABLES LIKE 'performance_schema'; - Enable in
my.cnfand restart MySQL - For RDS: modify the parameter group and reboot the instance
Missing slow query data
Missing slow query data
- Enable slow query log:
SET GLOBAL slow_query_log = 'ON'; - Set the threshold:
SET GLOBAL long_query_time = 1; - For RDS: modify the parameter group
Security
- Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
- Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
- Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
- Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
- SSL required — always enable SSL to encrypt data in transit.
- Minimal grants — grant only
SELECTto the CloudThinker user; never grant write access.
Related
Tony Agent
Database-focused optimization agent
PostgreSQL Connection
Similar setup for PostgreSQL databases