Skip to main content
Connect AnomalyArmor to any MySQL-compatible database. This guide covers self-hosted MySQL as well as managed services like Amazon RDS, Aurora MySQL, PlanetScale, and DigitalOcean. MySQL Connection Architecture

Supported Versions & Platforms

PlatformMinimum VersionNotes
MySQL5.7+Self-hosted or any cloud
Amazon RDS5.7+All instance classes
Amazon Aurora MySQL5.7+Cluster and serverless
PlanetScaleAnyServerless MySQL
DigitalOcean8.0+Managed databases
Google Cloud SQL5.7+Public or private IP
Azure Database5.7+Single server or flexible
MariaDB10.3+MySQL-compatible fork

Connection Settings

FieldDescriptionExample
Connection NameFriendly identifierProduction MySQL
HostHostname or IP addressdb.example.com
PortDatabase port3306
DatabaseDatabase namemyapp_production
UsernameDatabase useranomalyarmor
PasswordUser password••••••••
SSL ModeSSL configurationrequire

SSL Mode Options

ModeDescriptionWhen to Use
disableNo SSLLocal development only
requireSSL required, no verificationRecommended for most cloud providers
verify-caVerify server certificateHigh security requirements
verify-fullVerify certificate and hostnameMaximum security
Never use disable for production databases. Most cloud providers (RDS, Aurora, PlanetScale) require SSL.

Creating a Read-Only User

Create a dedicated user with minimal permissions:
-- Create the user
CREATE USER 'anomalyarmor'@'%' IDENTIFIED BY 'your-secure-password';

-- Grant read access to your database
GRANT SELECT ON your_database.* TO 'anomalyarmor'@'%';

-- Access to information_schema is implicit with SELECT
-- Flush privileges to apply changes
FLUSH PRIVILEGES;

For Multiple Databases

If you want to monitor multiple databases:
-- Grant access to specific databases
GRANT SELECT ON database1.* TO 'anomalyarmor'@'%';
GRANT SELECT ON database2.* TO 'anomalyarmor'@'%';
GRANT SELECT ON analytics.* TO 'anomalyarmor'@'%';

FLUSH PRIVILEGES;

Verifying Permissions

Test that the user can access metadata:
-- Should return tables
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'your_database' LIMIT 5;

-- Should return columns
SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'your_database' LIMIT 5;

Provider-Specific Instructions

Amazon RDS MySQL

Connection Details:
  • Host: Your RDS endpoint (e.g., mydb.abc123.us-east-1.rds.amazonaws.com)
  • Port: 3306 (default)
  • SSL Mode: require
Security Group Configuration:
  1. Go to AWS Console → RDS → Your Instance → Security Groups
  2. Edit inbound rules
  3. Add rule:
    • Type: MySQL/Aurora
    • Port: 3306
    • Source: AnomalyArmor IPs (see Settings → Security)
AWS Security Group RulesParameter Group (if using verify-ca or verify-full):
  • Ensure require_secure_transport = ON
  • Download RDS CA certificate bundle
RDS instances in private subnets require NAT Gateway or VPC peering for AnomalyArmor access. Contact us for Enterprise VPC peering options.

What We Query

AnomalyArmor runs these types of queries:
-- Tables and views
SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA NOT IN ('mysql', 'information_schema', 'performance_schema', 'sys');

-- Columns
SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'your_database';

-- Freshness (for timestamp columns)
SELECT MAX(your_timestamp_column) FROM your_table;
Impact: Minimal. These are lightweight metadata queries.

Excluded Schemas

AnomalyArmor automatically excludes MySQL system schemas:
  • mysql
  • information_schema
  • performance_schema
  • sys
Only user-created databases and tables are monitored.

Troubleshooting

Causes:
  • Firewall blocking the connection
  • Wrong hostname or port
  • Database not running
Solutions:
  1. Verify AnomalyArmor IPs are allowlisted
  2. Check security group rules (for RDS/Aurora)
  3. Test connectivity: nc -zv hostname 3306
  4. Verify MySQL is running: systemctl status mysql
Causes:
  • Wrong password
  • User doesn’t exist for connecting host
  • User lacks privileges
Solutions:
  1. Verify password (copy-paste to avoid typos)
  2. Confirm user exists: SELECT User, Host FROM mysql.user;
  3. Check user is created for % or specific IP
  4. Verify grants: SHOW GRANTS FOR 'anomalyarmor'@'%';
Causes:
  • Database requires SSL but connection uses disable
  • SSL certificate issues
Solutions:
  1. Set SSL Mode to require
  2. For RDS/Aurora/PlanetScale: SSL is required
  3. For self-hosted: Enable SSL or allow non-SSL (not recommended)
Causes:
  • Database name is incorrect
  • Database names are case-sensitive on Linux
Solutions:
  1. Verify database name: SHOW DATABASES;
  2. Use exact case for database name
  3. Check you have access: SHOW DATABASES; (shows only accessible DBs)
Causes:
  • User can’t see tables in information_schema
  • Schema filter excluding all schemas
Solutions:
  1. Test as the user: SELECT * FROM INFORMATION_SCHEMA.TABLES LIMIT 5;
  2. Check schema filter settings in AnomalyArmor
  3. Verify tables exist in the database

Next Steps

Run Discovery

Scan your MySQL database

Set Up Alerts

Get notified of schema changes