INFO

Please contact support@datafold.com if you use a MySQL version < 8.x.

INFO

Column-level Lineage is not currently supported for MySQL.

Steps to complete:

  1. Run SQL script for permissions and create schema for Datafold
  2. Configure your data connection in Datafold

Run SQL script and create schema for Datafold

To connect to MySQL, create a user with read-only access to all tables you wish to diff. Include read and write access to a Datafold-specific dataset:

-- Create a temporary dataset for Datafold to utilize
CREATE DATABASE IF NOT EXISTS datafold_tmp;

-- Create a Datafold user
CREATE USER 'datafold_user'@'%' IDENTIFIED BY 'SOMESECUREPASSWORD';

-- Grant read access to diff tables in YourSchema
GRANT SELECT ON `YourSchema`.* TO 'datafold_user'@'%';

-- Grant access to all tables in a datafold_tmp database
GRANT ALL ON `datafold_tmp`.* TO 'datafold_user'@'%';

-- Apply the changes
FLUSH PRIVILEGES;

Datafold utilizes a temporary dataset, named datafold_tmp in the above script, to materialize scratch work and keep data processing in the your warehouse.

Configure in Datafold

Field NameDescription
Connection nameA name given to the data connection within Datafold
HostThe hostname for your MySQL instance
PortMySQL connection port; default value is 3306
UsernameThe user created in our SQL script, named datafold_user
PasswordThe password created in our SQL script
DatabaseThe name of the MySQL database (schema) you want to connect to, e.g. YourSchema
Dataset for temporary tablesThe datafold_tmp database created in our SQL script

Click Create. Your data connection is ready!