Connect your MySQL or MariaDB database to Ledgerbeam to query your data using natural language. MySQL is one of the most widely used relational databases.Documentation Index
Fetch the complete documentation index at: https://docs.ledgerbeam.com/llms.txt
Use this file to discover all available pages before exploring further.
Features
- Full MySQL and MariaDB support
- Read-only and read/write connection modes
- SSH tunnel support for secure connections
- SSL/TLS encryption support
- Automatic schema analysis
Connection Requirements
- MySQL server version 5.7 or higher (or MariaDB 10.2+)
- Network access to your MySQL server
- Database credentials (username and password)
- Database name you want to connect to
Setup Instructions
Standard Connection
- Navigate to Resources in your Ledgerbeam dashboard
- Click “Add Resource” and select “MySQL”
- Choose your connection method (Standard or SSH Tunnel)
- Select connection mode (Read only or Read / Write)
- Enter your connection details:
- Host address: Your MySQL server hostname or IP
- Port: MySQL port (default: 3306)
- Database name: The database you want to connect to
- Username: Your MySQL username
- Password: Your MySQL password
- Configure SSL settings if required
- Click “Test Connection” to verify
- Click “Create Resource” to complete setup
SSH Tunnel Connection
For secure connections through an SSH tunnel:- Select “SSH Tunnel” as the connection method
- Enter SSH connection details:
- SSH Host address: Your SSH server hostname or IP
- SSH Port: SSH port (default: 22)
- SSH Username: Your SSH username
- Choose SSH authentication method:
- SSH Key: Provide your private key and optional passphrase
- Password: Provide your SSH password
- Enter your MySQL connection details
- Test and create the resource
SSL Configuration
Ledgerbeam supports various SSL modes:- Default: Use MySQL’s default SSL settings
- Allow: Try SSL, fall back to non-SSL if unavailable
- Prefer: Prefer SSL, fall back to non-SSL if unavailable
- Require: Require SSL connection
- Disable: Disable SSL
- Verify CA: Require SSL and verify CA certificate
- Verify Full: Require SSL and verify full certificate chain
Connection Modes
- Read only: Safe for production, prevents accidental data modification
- Read / Write: Allows data modifications through queries (use with caution)
Schema Analysis
After connecting, Ledgerbeam automatically:- Analyzes your database schema
- Identifies tables, columns, and relationships
- Understands data types and constraints
- Makes your data queryable with natural language
Troubleshooting
Connection Issues
- Verify your MySQL server is accessible from the internet
- Check firewall rules allow connections on port 3306 (or your custom port)
- Ensure your credentials are correct
- Verify the database name exists
- Check user permissions allow connections from your IP
SSL Issues
- Check your SSL certificate is valid
- Verify certificate format matches your selection (file or Base64)
- Ensure SSL mode matches your server configuration
SSH Tunnel Issues
- Verify SSH server is accessible
- Check SSH credentials are correct
- Ensure SSH key format is valid (PEM format)
- Verify MySQL is accessible from the SSH server
Best Practices
- Use read-only mode for production databases
- Enable SSL for secure connections
- Use SSH tunnels for additional security
- Regularly resync your resource to pick up schema changes
- Monitor connection health in your dashboard

