Skip to main content

MySQL

plan support

Only in Essential Plan and above

Our Essential plan enables you to import MySQL tables to your project, even if you're already using a boilerplate.

Prerequisites

Steps to Set up a MySQL as an Additional Data Source

Go to your project settings by clicking the Settings button on the lower left.

Wren Setting

The 'Data Connection' option in your project settings allows you to manage all data sources used in the project. Click the button ‘Connect a data source’ to open the Connect a Data Source menu.

w_ai_mysql.png

After selecting MySQL, you will be asked to enter the following fields:

w_ai_mysql_connection.png

Display name

The display name for the database in the Wren AI interface.

Host

Your MySQL database's IP address or domain name.

Port

Your MySQL database port.

Username

The database username for the account you want to use to connect to your MySQL database.

Password

The password for the username that you use to connect to the database.

Database name

The name of the database you want to connect to.

info

For more advance users you can select the update method of this data source. The methods are:

  • Read Changes using Write-Ahead Log (CDC). It incrementally reads new inserts, updates, and deletes using gthe MYSQL binary log. However, this must be enabled in your database.
  • Scan changes with User Defined Cursor (Default enabled). Incrementally detects new inserts and updates using the cursor column chosen when configuring a connection (e.g. created_at, updated_at).

After you click submit, you will see the connect source on the data connection page.

w_ai_msql2.png

Go to the "Modeling" page to start modeling your MySQL data. Click the "+" button next to "Models" to create a new data model. Select the Google Sheet table you want to use and Choose the specific columns you need. Think of tables as individual spreadsheets within the file. Click the ">" button next to each column you want to include, then click "Create" to finalize your model.

mysql_mdl_wren.gif

Add a description to each column in your MYSQL table mdl for better results. This helps Wren AI understand the data type in the field, leading to more accurate and relevant analysis.

Learn more about data modeling.