Skip to main content
If you’re using a managed MySQL service, check our provider-specific guides for step-by-step instructions tailored to your platform:

AWS RDS

PlanetScale

Railway

Laravel Cloud

Google Cloud SQL

Azure Database

Aiven

OVHcloud

Prerequisites

  • A MySQL database (version 5.7 or later recommended) that is accessible over the network
  • The database host, port, name, username, and password
  • A VexiData account

Connect MySQL to VexiData

1

Gather your connection details

You need five pieces of information to connect. If you set up MySQL yourself, you’ll already know these. If someone else manages the database, ask your database administrator.
2

Allow VexiData through your firewall (if applicable)

If your MySQL server is behind a firewall or only accepts connections from specific IPs, add VexiData’s IP addresses:
  • 46.101.71.122
Common places to configure this:
  • Cloud VMs (AWS EC2, DigitalOcean Droplets, GCP Compute) — Security Groups or firewall rules
  • Self-hosted servers — Your OS firewall (e.g., ufw, iptables)
  • Managed databases — See the provider-specific guides linked above
If your database is only accessible from localhost or a private network, you’ll need to either expose it to the internet or set up an SSH tunnel. VexiData requires a direct TCP connection to your database.
3

Verify MySQL accepts remote connections

By default, MySQL may only listen on localhost. If your database is on a remote server, make sure it’s configured to accept external connections:
  1. In your MySQL configuration file (my.cnf or my.ini), set:
  1. Restart MySQL for the change to take effect.
  2. Verify your MySQL user is allowed to connect from remote hosts. Users created with 'localhost' can only connect locally:
If the host column shows localhost or 127.0.0.1, you’ll need to create a user that allows remote access (see the read-only user section below).
Managed database services (AWS RDS, PlanetScale, etc.) handle this automatically. You only need this step for self-hosted MySQL.
4

Add the connection in VexiData

  1. Go to Data Sources in VexiData
  2. Click MySQL to open the connection form
  3. Fill in the details:
5

Test and save

Click Test & Save Connection. VexiData will verify it can reach your database. Once connected, your schema will be analyzed automatically.
For security, we recommend connecting VexiData with a dedicated read-only user instead of your admin or application user. This ensures VexiData can only read data, never modify it.
To restrict access to specific tables instead of the entire database:

Troubleshooting

This means VexiData can’t reach your server. Check:
  • Your firewall allows inbound connections on port 3306 from VexiData’s IPs
  • bind-address in your MySQL config is set to 0.0.0.0 (not 127.0.0.1)
  • Your server has a public IP or hostname that resolves correctly
  • If on a cloud VM, the Security Group / firewall rules allow traffic on port 3306
  • Verify the username and password are correct
  • Check that the MySQL user allows connections from remote hosts. Run SELECT user, host FROM mysql.user; to see allowed hosts — if it shows localhost, the user can’t connect remotely
  • Create a user with '%' as the host to allow connections from any IP: CREATE USER 'user'@'%' IDENTIFIED BY 'password';
  • The MySQL user might not have permissions on the specified database. Grant access with: GRANT SELECT ON your_database.* TO 'user'@'%';
  • Run SHOW GRANTS FOR 'your_user'@'%'; to verify current permissions
  • Check that your user has SELECT permissions on the tables in the database
  • Verify you entered the correct database name — MySQL database names are case-sensitive on Linux
  • Run SHOW TABLES; in the MySQL CLI to confirm tables exist in the database
  • If your server requires SSL, VexiData will attempt SSL automatically
  • For self-hosted servers, ensure MySQL SSL is properly configured with valid certificates
  • Check that require_secure_transport is set correctly in your MySQL config