🐬 MySQL Connection
Connect your MySQL database to Meza AI.
Overview
Connect your MySQL database to Meza AI to sync your customer data. This integration supports MySQL 5.7+ and MariaDB 10.2+, covering most production MySQL deployments.
Prerequisites
- MySQL 5.7+ or MariaDB 10.2+
- Database credentials with read access
- Network access to the database (whitelist Meza AI IPs if needed)
Connection Steps
1
Navigate to Databases
Go to Configuration → Databases in the left sidebar.
2
Select MySQL
Click Add Connection and select MySQL.
3
Enter Connection Details
Fill in host, port, database name, username, and password.
4
Configure SSL (Optional)
Enable SSL if your database requires encrypted connections.
5
Test & Save
Click Test Connection then Save.
Connection Parameters
| Parameter | Description | Example |
|---|---|---|
| Host | Database server hostname or IP | mysql.example.com |
| Port | MySQL port (default: 3306) | 3306 |
| Database | Name of the database | myapp_production |
| Username | Database username | meza_readonly |
| Password | Database password | ******** |
| SSL | Enable SSL connection | Yes/No |
⚠️ Warning
Always create a dedicated read-only user for Meza AI to follow security best practices.
Creating a Read-Only User
Run these SQL commands to create a read-only user:
-- Create the user CREATE USER 'meza_readonly'@'%' IDENTIFIED BY 'your_secure_password'; -- Grant read-only access to your database GRANT SELECT ON your_database.* TO 'meza_readonly'@'%'; -- Apply changes FLUSH PRIVILEGES;
Whitelisting Meza AI IPs
If your database is behind a firewall, whitelist these IP addresses:
34.102.136.180
35.247.10.205AWS RDS MySQL
For Amazon RDS MySQL instances:
- Use the RDS endpoint as the host (e.g.,
mydb.abc123.us-east-1.rds.amazonaws.com) - Add Meza AI IPs to your security group inbound rules
- Enable SSL using the AWS RDS certificate bundle
Troubleshooting
Connection Refused
- Verify MySQL is running and accepting connections
- Check firewall rules allow connections from Meza AI IPs
- Ensure the port (usually 3306) is correct
Access Denied
- Double-check username and password
- Verify the user has SELECT privileges on the database
- Check the user is allowed to connect from external hosts (% or specific IP)