- Tools & Actions
- MySQL Database
Agency & Reseller
Chat to Your MySQL Database
How it Works
- Discovers the database schema (table structure)
- Generates the appropriate SQL query
- Executes the query (read-only) and returns the results
All queries are read-only (SELECT only). The agent cannot modify your data.
Adding the MySQL Database Action
1
In your chatbot dashboard, go to Configuration > Tools & Actions.
2
Click the + Add Action button.
3
Find MySQL Database and click Add.
Configuration
Name (required)
Description (required)
Example:
Make the Name and Description as specific as possible so the AI agent knows exactly when to use this action and what kind of data to look for.
Host (required)
Port (required)
Database Name (required)
Username (required)
We strongly recommend creating a dedicated read-only user for your chatbot connection. This ensures the chatbot can only read data and prevents accidental modifications.
CREATE USER 'chatbot_readonly'@'%' IDENTIFIED BY 'your_password';
GRANT SELECT ON your_database.* TO 'chatbot_readonly'@'%';
FLUSH PRIVILEGES;
Password (required)
SSL (optional)
Enable SSL/TLS for the connection. Recommended for cloud-hosted databases such as AWS RDS, Google Cloud SQL, PlanetScale, or DigitalOcean Managed Databases. Enabled by default.
Connection Validation
- Incorrect hostname or port
- Wrong username or password
- Firewall blocking the connection
- SSL required but not enabled
Security
- Read-only queries only – the agent can only execute SELECT statements
- Query timeout – queries are limited to 5 seconds to prevent slow queries from affecting your database
- Result size limit – large results are truncated to prevent excessive data transfer
- All credentials are encrypted at rest
Make sure your MySQL server allows connections from external IP addresses. You may need to update your firewall rules or security group settings to allow connections from the AI Chatbot server.
Example Use Case
- “What products do you have in stock?”
- “What is the price of the Pro Plan?”
- “How many orders were placed this month?”
- “Show me the top-selling products”
Ready to automate your customer service with AI?
Join over 1000+ businesses, websites and startups automating their customer service and other tasks with a custom trained AI agent.