mysql

MySQL

Connect a MySQL database to WasteNot to pull customer and transaction data directly from your database. Write custom SQL queries to define exactly what data feeds into your audiences.

Prerequisites

  • A MySQL database accessible over the internet
  • A database user with read-only access to the tables you want to query
  • The database host, port, name, and credentials

Connecting MySQL

Step 1: Create the data source

  1. Add a new MySQL data source in WasteNot
  2. Enter a Name
  3. Click Save

Step 2: Configure connection details

After creating the data source, go to its detail page and fill in your connection details:

  • Host — The hostname or IP address of your MySQL server
  • Port — The port MySQL is listening on (default: 3306)
  • Database — The name of the database to connect to
  • Username — A read-only database user
  • Password — The password for the database user

Once the fields are filled in, click Connect. WasteNot will verify the connection.

Custom streams

Once connected, you can create streams to define what data WasteNot pulls from your database. Each stream is a SQL query that returns rows matching WasteNot's expected format.

See the Writing Custom Queries guide for full details on required columns and event types.

  1. Go to your MySQL data source detail page
  2. Click New Stream
  3. Give the stream a name, select an event type, and enter your SQL query
  4. Save the stream

WasteNot will run the query on a schedule and sync the results automatically.

Frequently asked questions

What permissions does the database user need?

The user needs SELECT privileges on the tables or views referenced in your stream queries.

Can I connect to a read replica?

Yes. Connecting to a read replica is a great way to avoid any performance impact on your primary database.

Does WasteNot support MariaDB?

MariaDB is wire-compatible with MySQL, so it should work with the MySQL connector. If you run into issues, reach out to support@wastenot.io.

My data source shows "Failed" status

Common causes:

  • The database is not reachable from the internet
  • Credentials are incorrect or the user has been disabled
  • A firewall is blocking the connection
  • SSL configuration issues

Check with your data team, or reach out to support@wastenot.io for help.

Was this page helpful?