Count
count.co
  • Getting Started
    • What is Count?
    • Count FAQ
    • Intro to your workspace
    • Example canvases
    • Getting started guides
      • Set up your workspace and projects
        • 1. Review workspace settings
        • 2. Create and organise your projects
      • Canvas orientation
      • Your first ad hoc analysis
        • 1. Examples and templates
        • 2. Build your first queries
        • 3. Create visuals
        • 4. Caching, local cells and scheduling
        • 5. Collaborating with a stakeholder
      • Your first report
        • 1. Examples and templates
        • 2. Filters and control cells
        • 3. Sharing your report
        • 4. Alerts
  • Connect your data
    • Database connection overview
      • Athena
      • Azure Synapse
      • BigQuery
      • Databricks
      • Microsoft SQL Server
      • MySQL
      • PostgreSQL
      • Redshift
      • Snowflake
    • Refresh database schema
    • Upload CSV files
    • dbt integration
      • ☁️dbt Cloud integration
      • 👩‍💻dbt Core integration
  • Import & Export
    • Import from other tools
      • Import Miro files
      • Import SQL files
      • Import Google Sheets
      • Import Jupyter notebooks
    • Export code and results
      • Export compiled SQL and Jinja-SQL
      • Export CSV files
      • Export images and PDF files
  • THE CANVAS
    • Navigating the canvas
      • Canvas tool bar
      • Data sidebar
      • Customizing the canvas
    • Canvas objects
      • Cells
      • Text and markdown
      • Shapes and tools
      • Sticky notes
      • Frames
      • Images
      • Embeds
      • Stamps
      • Grouping objects
      • Object order and alignment
      • Locking objects
      • Scaling objects
      • Shared styles
    • Overviews
    • Templates
    • Count AI
    • Alerts and subscriptions
      • Slack integration
    • Keyboard shortcuts
  • Querying data
    • Cells overview
      • Dynamic query compilation engine
    • SQL cells
      • Referencing other cells
      • Jinja templating
      • SQL formatting
    • Python cells
    • Visual and low-code cells
      • Calculations in visuals and low-code cells
      • Joins in visuals and low-code cells
    • Control cells
      • Single and multiple selects
      • Date controls
      • Text, number, and boolean controls
      • Custom control cells
    • Local DuckDB cells
      • DuckDB on the server
    • Query caching and scheduling
    • Manage queries and results
    • Troubleshooting
  • Visualizing data
    • Visualization overview
    • Templated visuals
    • Custom visuals
      • Marks
      • Facet
      • Subplots
      • Style
      • Filters
    • Formatting a visual
      • Axes
        • Secondary Axis
      • Colors and labels
      • Legends
      • Tooltips
    • Column summaries
    • Dynamic text
    • Every Visual Under the Sun
  • Presenting and Reporting
    • Reports and Slides
  • Count Metrics
    • Intro to Count Metrics
    • Build and edit a catalog
    • Views
      • Creating views
      • Customizing views
    • Datasets
      • Creating datasets
    • Save changes to the catalog
      • Catalog validation
      • Version control
    • Exposing catalogs to the workspace
    • Caching in Count Metrics
    • Using the catalog
      • Explore from cell
  • Sharing and Permissions
    • Real-time collaboration
    • Comments
    • Sharing permissions
    • Shared links
    • Embedding canvases
  • History and Versions
    • Version control
    • Duplicating and merging
    • Data snapshots
  • Settings and administration
    • Workspace settings
      • Workspace members
      • Groups
      • Tags
      • Billing
      • Single sign-on (SSO)
        • Okta
        • Entra ID
        • JumpCloud
        • Google
        • Generic OIDC
      • Brand
    • Connection settings
    • Project settings
    • User settings
    • Roles and permissions
  • Quick guides
    • Interactive control guides
      • Date ranges
      • Date groupings
      • Search
      • Select All
  • Resources
    • Join the Slack community
  • Blog
  • Security overview
  • Terms of use
  • Pricing FAQ
Powered by GitBook
On this page
  • Click "Connect a database"
  • Enter your connection details
  • Connect
  • Troubleshooting
  • SSL certificate errors
  1. Connect your data
  2. Database connection overview

MySQL

How to connect MySQL to Count.

PreviousMicrosoft SQL ServerNextPostgreSQL

Last updated 5 months ago

Click "Connect a database"

Enter your connection details

You'll need to know

  • the Host

  • Port

  • Database name

  • Username

  • Password

You'll need to make sure your firewall accepts requests from the following IP addresses:

34.107.75.117
35.198.189.90
35.234.110.177
104.155.13.208

Connections between Count and your database are encrypted by SSL (TLS). Your database must be configured to use SSL in order for Count to connect.

For additional security, you may optionally provide the certificate authority, public client certificate and private client key (in PEM format).

Connect

Once you hit Connect you will see your connection details including a full list of tables accessible with this connection.

Troubleshooting

If you're having trouble connecting, check the error message returned at the top of the Connection page against the table below for a possible fix.

Error snippet

Possible resolution

Can't connect to MYSQL server Connection timed out

Connection Refused

ENOTFOUND

ETIMEDOUT

Check your Host and Port settings and that your database server is open to accept connections from the whitelisted Count IP addresses

Access denied for user

Password authentication failed; please check Username, Password, and Database name settings

Not allowed to connect to MYSQL server

Check the Username with these credentials is authorised to connect to the database from the whitelisted Count IP addresses

Self signed certificate in certificate chain

Check that your database server supports SSL connections. If your database server has self-signed certificates, does not support verifiable certificates, or your host is an IP address you may need to add the Certificate Authority or "trust" the incoming server certificate (see SSL certificate errors section below)

SSL certificate errors

If you see a connection error complaining about "self signed certificates", it's likely that there's an issue verifying the SSL certificates issued by your database server against the host parameter of your sever details. This can happen for several reasons

  • You are using manually created self signed certificates, in which case it's not possible to verify the identity of your server

  • The database server does support verifiable certificates (e.g. some Heroku systems)

  • The certificates are issued by the provider of your managed database server (e.g. Digital Ocean, GCP) and the host parameter is an IP address

If anyone of these is the case, the connection issue can usually be resolved either by

  • downloading your database server Certificate Authority (CA) file, usually given in PEM format, and uploading to the "Advanced" section of the connection setup

  • or, activating the "Trust server certificate" in the "Advanced" section of the connection setup

Why don't I need to upload the CA when connecting to other products?

You may be wondering why you're able to connect automatically to clients such as mysql client or other web-based BI tools, but Count may require you to upload the CA certificate.

What does "Trust server certificate" mean?

You should consult your database administrator to confirm that this setting is appropriate for your system.

If another product is able to connect automatically without the above worrying about server certificates, it may be worth checking what SSL mode they are using for communication, and whether this is sufficient for your needs.

In the section of the MySQL documentation, it clarifies that there are 6 modes of SSL support.

By default, Count communicates with your database server by using the most secure method of communication, "verify-full", which provides full protection against eavesdropping and attacks. This method requires full verification of the CA , which may not be possibly if the server does not issue a root certificate, or if the domain of the certificate and the database server host address do not match (as is usually the case where the host parameter is an IP address). In that case, uploading the CA file manually to Count allows the communication to happen safely with the mode "verify-ca", using your uploaded certificate to ensure maximal protection against eavesdropping and MITM attacks.

If you are unable to obtain a copy of your database CA (e.g. some Heroku systems), the only way to initiate encrypted communication with your database is to trust that the certificate sent by the server is correct (SSL mode "require"). This ensures full protection against eavesdropping, but not against attacks. Count will only use this mode of communication if you activate the "Trust server certificate" in the "Advanced" section of the connection setup.

If you are having trouble connecting, to us to schedule a help session

Configuring MySQL to Use Encrypted Connections
MITM
MITM
reach out