If your database is on Amazon RDS, please visit the RDS setup documentation to first enable Chartio in your security groups before following these steps.

If your MySQL database is hosted on Google Cloud SQL, please follow the instructions for connecting Google Cloud SQL to Chartio.

Check out our step-by-step video showing how to connect your MySQL database to Chartio:

1. Create a MySQL read-only user

Chartio requires a read-only user for connecting to your database. Here is a sample GRANT statement for creating a read-only user:

ON $database_name.*
TO $user@`` IDENTIFIED BY '$password';

$database_name, $user, and $password are described in the Chartio connection form. Copy this command and paste it into a MySQL shell to create the user. This will grant the user read-only access to ALL tables in your database. If you would like to restrict access to only certain tables in your database, check out our Data Tutorial on granting MySQL table and column permissions.

2. Connect MySQL to Chartio

You’ll need to provide the following information in Chartio’s MySQL connection form to connect your MySQL database to Chartio:

  • Hostname or IP: where your database is hosted
  • Port: default port number for MySQL is 3306
  • Username: username of the MySQL read-only user you created previously
  • User Password: password of the MySQL read-only user you created
  • Database Name: name of your MySQL database

MySQL SSL connection

Instructions on creating a certificate and SSL connection can be found in the MySQL SSL connection documentation.