Splitgraph has been acquired by EDB! Read the blog post.

Query MySQL data

With its PostgreSQL-compatible interface, Splitgraph is the easiest way to get data from MySQL queryable with any of your BI tools.

use tools

What is Splitgraph?

Splitgraph is a data API to power your analytics, data visualizations and other read-intensive applications.

Get started
 

Connecting MySQL to your query tool with Splitgraph

First, connect Splitgraph to MySQL.
This will create a Splitgraph repository with data from MySQL.
You can now query it with any SQL client or BI tool that supports PostgreSQL.
Now, connect your query tool to Splitgraph.
Data from MySQL will now be available to query directly from your SQL client.
repositories:
- namespace: CHANGEME
  repository: airbyte-mysql
  # Catalog-specific metadata for the repository. Optional.
  metadata:
    readme:
      text: Readme
    description: Description of the repository
    topics:
    - sample_topic
  # Data source settings for the repository. Optional.
  external:
    # Name of the credential that the plugin uses. This can also be a credential_id if the
    # credential is already registered on Splitgraph.
    credential: airbyte-mysql
    plugin: airbyte-mysql
    # Plugin-specific parameters matching the plugin's parameters schema
    params:
      host: ''  # REQUIRED. Host. The host name of the database.
      port: '3306' # REQUIRED. Port. The port to connect to.
      database: '' # REQUIRED. Database. The database name.
      username: '' # REQUIRED. Username. The username which is used to access the database.
      replication_method: # REQUIRED. Replication Method. Replication method to use for extracting data from the database.. Choose one of:
      -  # STANDARD. Standard replication requires no setup on the DB side but will not be able to represent deletions incrementally.
        method: STANDARD  # REQUIRED. Constant
      - # Logical Replication (CDC). CDC uses the Binlog to detect inserts, updates, and deletes. This needs to be configured on the source database itself.
        method: CDC  # REQUIRED. Constant
      normalization_mode: basic # Post-ingestion normalization. Whether to normalize raw Airbyte tables. `none` is no normalization, `basic` is Airbyte's basic normalization, `custom` is a custom dbt transformation on the data.. One of none, basic, custom
      normalization_git_branch: master # dbt model Git branch. Branch or commit hash to use for the normalization dbt project.
      jdbc_url_params: '' # JDBC URL Params. Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3).
      ssl: true # SSL Connection. Encrypt data using SSL.
    tables:
      sample_table:
        # Plugin-specific table parameters matching the plugin's schema
        options:
          airbyte_cursor_field: []  # Cursor field(s). Fields in this stream to be used as a cursor for incremental replication (overrides Airbyte configuration's cursor_field)
          airbyte_primary_key_field: [] # Primary key field(s). Fields in this stream to be used as a primary key for deduplication (overrides Airbyte configuration's primary_key)
        # Schema of the table, a list of objects with `name` and `type`. If set to `[]`, will infer. 
        schema: []
    # Whether live querying is enabled for the plugin (creates a "live" tag in the
    # repository proxying to the data source). The plugin must support live querying.
    is_live: false
    # Ingestion schedule settings. Disable this if you're using GitHub Actions or other methods
    # to trigger ingestion.
    schedule:
credentials:
  airbyte-mysql:  # This is the name of this credential that "external" sections can reference.
    plugin: airbyte-mysql
    # Credential-specific data matching the plugin's credential schema
    data:
      normalization_git_url: ''  # dbt model Git URL. For `custom` normalization, a URL to the Git repo with the dbt project, for example,`https://uname:pass_or_token@github.com/organisation/repository.git`.
      password: '' # Password. The password associated with the username.
      ssl_mode: # SSL modes. SSL connection modes. <li><b>preferred</b> - Automatically attempt SSL connection. If the MySQL server does not support SSL, continue with a regular connection.</li><li><b>required</b> - Always connect with SSL. If the MySQL server doesn’t support SSL, the connection will not be established. Certificate Authority (CA) and Hostname are not verified.</li><li><b>verify-ca</b> - Always connect with SSL. Verifies CA, but allows connection even if Hostname does not match.</li><li><b>Verify Identity</b> - Always connect with SSL. Verify both CA and Hostname.</li></ul>Read more <a href="https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-using-ssl.html"> in the docs</a>.. Choose one of:
      -  # preferred. Preferred SSL mode.
        mode: preferred  # REQUIRED. Constant
      - # required. Require SSL mode.
        mode: required  # REQUIRED. Constant
      - # Verify CA. Verify CA SSL mode.
        mode: verify_ca  # REQUIRED. Constant
        ca_certificate: '' # REQUIRED. CA certificate. CA certificate
        client_certificate: '' # Client certificate. Client certificate (this is not a required field, but if you want to use it, you will need to add the <b>Client key</b> as well)
        client_key: '' # Client key. Client key (this is not a required field, but if you want to use it, you will need to add the <b>Client certificate</b> as well)
        client_key_password: '' # Client key password (Optional). Password for keystorage. This field is optional. If you do not add it - the password will be generated automatically.
      - # Verify Identity. Verify-full SSL mode.
        mode: verify_identity  # REQUIRED. Constant
        ca_certificate: '' # REQUIRED. CA certificate. CA certificate
        client_certificate: '' # Client certificate. Client certificate (this is not a required field, but if you want to use it, you will need to add the <b>Client key</b> as well)
        client_key: '' # Client key. Client key (this is not a required field, but if you want to use it, you will need to add the <b>Client certificate</b> as well)
        client_key_password: '' # Client key password (Optional). Password for keystorage. This field is optional. If you do not add it - the password will be generated automatically.
Use Data Source in splitgraph.yml
You can copy this into splitgraph.yml, or we'll generate it for you.

Developer-first

Use our splitgraph.yml format to check your Splitgraph configuration into version control, trigger ingestion jobs and manage your data stack like your code.

Get started
 
heart-icon

Why Splitgraph and MySQL?

Splitgraph connects your vast, unrelated data sources and puts them in a single, accessible place.

Unify your data stack

Splitgraph handles data integration, storage, transformation and discoverability for you. All that remains is adding a BI client.

Read more
 

Power your applications

Focus on building data-driven applications without worrying about where the data will come from.

heart-icon

Not just Data Source...

Splitgraph supports data ingestion from over 100 SaaS services, as well as data federation to over a dozen databases. These are all made queryable over a PostgreSQL-compatible interface.

heart-icon

Optimized for analytics

Splitgraph stores data in a columnar format. This accelerates analytical queries and makes it perfect for dashboards, blogs and other read-intensive use cases.

use-tools

Do more with MySQL?

heart-icon

MySQL on Splitgraph

Read more about Splitgraph’s support for MySQL, including its documentation and sample queries you can run on MySQL data with Splitgraph.

MySQL overview
 
heart-icon

Connecting to Splitgraph

Splitgraph has a PostgreSQL-compatible endpoint that most BI clients can connect to.

Try it out