Linking MySQL as a source

Last updated:

|Edit this page|

The MySQL connector can link your database tables to PostHog.

To link MySQL:

  1. Go to the Data pipeline page and the sources tab in PostHog
  2. Click New source and select MySQL
  3. Enter your database connection details:
    • Host: The hostname or IP your database server like db.example.com or 123.132.1.100.
    • Port: The port your database server is listening to. The default is 3306.
    • Database: The name of the database you want like analytics_db.
    • User: The username with the necessary permissions to access the database.
    • Password: The password for the user.
    • Schema: The schema for your database where your tables are located. The default is public.
    • Use SSL: Whether to use SSL for the connection. Default is enabled.
  4. If you need to connect through an SSH tunnel, enable and configure it (optional):
    • Tunnel host: The hostname of your SSH server.
    • Tunnel port: The port your SSH server is listening on.
    • Authentication type:
      • For password authentication, enter your SSH username and password.
      • For key-based authentication, enter your SSH username, private key, and optional passphrase.
  5. Click Next

The data warehouse then starts syncing your MySQL data. You can see details and progress in the sources tab.

Inbound IP addresses

We use a set of IP addresses to access your instance. To ensure this connector works, add these IPs to your inbound security rules:

USEU
44.205.89.553.75.65.221
44.208.188.17318.197.246.42
52.4.194.1223.120.223.253

Questions? Ask Max AI.

It's easier than reading through 675 pages of documentation

Community questions

Was this page useful?

Next article

Linking MongoDB as a source

The MongoDB connector can link your mongodb tables to PostHog. To link MongoDB: Go to the Data pipeline page and the sources tab in PostHog Click New source and select MongoDB Enter your mongodb connection string Click Link Once the syncs are complete, you can start using MongoDB data in PostHog. Note: MongoDB data is unstructured so the returned columns are an _id field and a data column that contain the entire document contents. Data fields can be selected with dot notation (e.g…

Read next article