MySQL

Connect a MySQL database to Credible

Credible connects to MySQL with a username and password.

Create a User

Create a read-only user for Credible, replacing the database name and password:

CREATE USER 'credible_readonly'@'%' IDENTIFIED BY '<strong password>';
GRANT SELECT, SHOW VIEW ON sales.* TO 'credible_readonly'@'%';

Connection Fields

FieldExample
Hostdb.example.com
Port3306
Database Namesales
Usernamecredible_readonly
Passwordyour database password

The form has no TLS setting.

Network Access

The host needs to be reachable from the public internet, and from Credible's egress addresses if it sits behind an allowlist. For a database with no public route, see Private Networking.

From the CLI

To add the connection with cred add connection, put an entry like this in the JSON file:

[
  {
    "name": "warehouse",
    "type": "mysql",
    "mysqlConnection": {
      "host": "db.example.com",
      "port": 3306,
      "database": "sales",
      "user": "credible_readonly",
      "password": "..."
    }
  }
]

Troubleshooting

ProblemCauseFix
Access denied for userWrong password, or the user's host part does not match Credible's addressCheck the password. Create the user with host '%', or with Credible's egress address
connect ETIMEDOUTThe host is not reachable from CredibleAdd Credible's egress addresses to the firewall or security group
SELECT command denied to userThe user lacks read accessGRANT SELECT ON <database>.* TO ...

Next Steps

On this page