# MariaDB: 'database connection failed'

Steps to avoid running into a Database connection failed error.

June 20, 2022

If you're trying to connect a MariaDB database and receive a Database connection failed error, run through this checklist to prepare your database for connecting to Geckoboard:

- Verify that your database is running correctly and is accessible online. You can [run a check for this](https://support.geckoboard.com/en/articles/6055570-mariadb-database-connection-failed).

- Ensure your database accepts connections from these Geckoboard IP addresses:

- `23.23.205.140`
  - `50.16.244.16`
  - `54.204.39.96`
  - `54.243.225.101`
  - `54.243.235.136`
  - `54.243.235.173`

- Connections between Geckoboard and your database will be encrypted so your database must have TLS encryption enabled. For **MariaDB** TLS is disabled by default. Check if it's enabled by running the command `SHOW VARIABLES LIKE '%ssl%';`. [Learn more about how to enable TLS for MariaDB](https://www.osradar.com/configure-mariadb-with-ssl-to-secure-connections/).

- Geckoboard only allows `SELECT` queries, but for extra security, we only accept connections from users that have read-only access to the DB.
