MySQL
info
Please contact support@datafold.com if you use a MySQL version < 5.6.
info
Column-level Lineage is not currently supported for MySQL.
Steps to complete:
Run SQL Script
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 'DatafoldUser'@'%' IDENTIFIED BY 'SOMESECUREPASSWORD';
-- Grant read access to diff tables in YourSchema
GRANT SELECT ON `YourSchema`.* TO 'DatafoldUser'@'%';
-- Grant read + write access to all tables in datafold_tmp database
GRANT SELECT, INSERT, UPDATE, DELETE ON `datafold_tmp`.* TO 'DatafoldUser'@'%';
-- Apply the changes
FLUSH PRIVILEGES;
Configure in Datafold
Field Name | Description |
---|---|
Connection name | A name given to the data source within Datafold |
Host | The hostname for your MySQL instance |
Port | MySQL connection port; default value is 3306 |
Username | The user created in our SQL script - DatafoldUser |
Password | The password created in our SQL script |
Database | The name of the MySQL database you want to connect to |
Dataset for temporary tables | The schema created in our SQL script |
Click Create. Your data source is ready!