MySQL
Connect your MySQL databases to Memex for AI-powered data analysis.
What is MySQL?
MySQL is one of the world's most popular open-source relational database management systems. It's widely used for web applications, data warehousing, and as a backend for countless applications. Once connected, Memex can query your MySQL databases, explore schemas, and help you analyze your data through natural conversation.
What You'll Need
Host
MySQL server hostname or IP
mysql.example.com or 127.0.0.1
Port
MySQL server port
3306 (default)
Database
Name of the database
myapp_production
Username
MySQL username
app_user
Password
MySQL password
Your secure password
Finding Your Credentials
For Cloud MySQL Services
Amazon RDS for MySQL:
Log in to the AWS Console and go to RDS
Select your MySQL instance
Find the Endpoint (this is your host) and Port in the Connectivity section
Use the master username or a dedicated user you've created
Google Cloud SQL:
Go to the Cloud SQL instances page
Select your instance
Find the Public IP address or Private IP address for the host
Use credentials created through the Users section
PlanetScale / Other Managed MySQL:
Check your provider's dashboard for connection details
Most providers show host, port, username, and password in a connection string format
For Self-Hosted MySQL
Contact your database administrator to obtain:
The server hostname or IP address
The port number (default is 3306)
The database name
A username and password with appropriate permissions
Connecting to Memex
Open the Memex Hub from the sidebar
Click on the Connectors tab
Find and click the MySQL card
Enter your Host, Port, Database, Username, and Password
Give your connection a memorable name (e.g., "Production MySQL")
Click Add Connection
Verifying Your Connection
Once connected, try asking Memex:
You should see a list of tables in your database.
Using Your Connection
Here are some examples of what you can ask:
Security Considerations
User Permissions
Create a dedicated read-only user for Memex:
Never use the root account for application connections. Always create dedicated users with minimal required permissions.
Network Security
Ensure your MySQL server allows connections from external sources if needed
Use SSL/TLS connections when available
Configure firewall rules to restrict access to trusted IP addresses
For cloud databases, use private networking or VPC when possible
Password Security
Use strong, unique passwords for database accounts
Rotate passwords periodically
Never commit database credentials to version control
Troubleshooting
Connection Refused
Verify the hostname and port are correct
Check that MySQL is running (
systemctl status mysqlon Linux)Ensure the MySQL server allows remote connections (check
bind-addressin my.cnf)Verify firewall rules allow connections on port 3306
Access Denied
Double-check your username and password
Verify the user has access from your connection location (check the host part of the user, e.g.,
'user'@'%'vs'user'@'localhost')Ensure the user has SELECT privileges on the database
Try connecting with a MySQL client to test credentials
Unknown Database
Verify the database name is spelled correctly
Ensure the database exists on the server
Check that the user has permission to access the database
SSL Connection Errors
If SSL is required, ensure your connection is configured for SSL
For some cloud providers, you may need to download and specify an SSL certificate
Check if the MySQL server requires SSL connections
Learn More
Last updated
Was this helpful?