Docs/Data Sources/MySQL & MariaDB

MySQL & MariaDB

Connect MySQL and MariaDB databases to conexor.io for AI-powered querying.

TIPMySQL 8.0+ and MariaDB 10.5+ are fully supported. Both Direct and Agent (on-premise) connection modes work with MySQL/MariaDB.

Prerequisites

  • MySQL 8.0+ or MariaDB 10.5+
  • A database user with SELECT permissions on the tables you want to expose
  • Network access from conexor.io (Direct mode) or from your agent host (Agent mode)

Connection String Format

conexor.io accepts standard ADO.NET-style MySQL connection strings:

Server=your-host.example.com;Port=3306;Database=mydb;Uid=conexor_reader;Pwd=your_password;SslMode=Required

You can also paste the connection string directly into the setup wizard, or fill in the individual fields (host, port, database, username, password).

Creating a Read-Only User

We strongly recommend creating a dedicated read-only user for conexor.io:

CREATE USER 'conexor_reader'@'%' IDENTIFIED BY 'your_secure_password';
GRANT SELECT ON mydb.* TO 'conexor_reader'@'%';
FLUSH PRIVILEGES;
NOTEUsing a read-only user ensures that AI-generated queries can never modify or delete data, regardless of the query the AI produces.

SSL/TLS Configuration

Enable SSL for encrypted connections by adding SslMode=Required to your connection string. For cloud-hosted MySQL (AWS RDS, Azure MySQL, PlanetScale, etc.), SSL is typically required by default.

Available SSL modes: None, Preferred, Required, VerifyCA, VerifyFull.

Schema Discovery

Once connected, conexor.io automatically discovers your schema using INFORMATION_SCHEMA. It detects tables, columns, data types, primary keys, and foreign key relationships. This information is used to:

  • Auto-generate MCP tools for each table
  • Provide AI with schema context for intelligent query generation
  • Enable the AI Schema Analysis feature (generates human-readable descriptions of each table)

Parameterized Queries

All queries are parameterized at the protocol level using MySQL's native prepared statement support. Use @paramName syntax in your query templates:

SELECT * FROM orders
WHERE customer_id = @customerId
ORDER BY @orderBy
LIMIT @maxRows OFFSET @skipRows

Cloud Provider Quick Guides

AWS RDS MySQL

Find your connection details in the RDS console under your instance → Connectivity. Ensure your security group allows inbound connections on port 3306 from conexor.io's IP ranges (or use Agent mode for private networks).

PlanetScale

Go to your PlanetScale dashboard → your database → Connect. Select "General" connection string format and copy it. PlanetScale requires SSL by default.

Azure Database for MySQL

Find your connection string in the Azure portal → your MySQL server → Connection strings. Add conexor.io's IPs to your firewall rules, or use Agent mode.

Relay

Quick questions

Relay

Quick questions