Skip to content

Mysql private beta

First Step

Run on your database

Create an epsio_user with the necessary permissions and create a database for Epsio.

-- Create Epsio user and database
CREATE USER epsio_user IDENTIFIED BY '<password>';
CREATE DATABASE epsio;
GRANT ALL PRIVILEGES ON epsio.* TO epsio_user;

-- Grant replication permissions to Epsio user
GRANT REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO epsio_user;

-- Grant permission for Epsio user to create views and populate data from existing tables
-- Replace first * with specific database name if you want to limit access
GRANT SELECT, CREATE, SHOW VIEW, CREATE VIEW, ALTER, INSERT, LOCK TABLES, DELETE, DROP ON *.* TO epsio_user;

Configure Your Database - Aurora

To check if your Aurora instance is already configured to work with Epsio, you can run the following commands:

-- Required configuration: ON
SHOW VARIABLES LIKE 'log_bin';

-- Required configuration: ON
SHOW VARIABLES LIKE 'log_bin_trust_function_creators';

-- Required configuration: ROW
SHOW VARIABLES LIKE 'binlog_format';

-- Value should be 1 hour or bigger
CALL mysql.rds_show_configuration();
If any of the above does not show the required configuration, follow the steps below to reconfigure.

Configure binary logging

Step 1: Create a new paramter group To set custom cluster parameter group for your instance, create a custom DB cluster parameter group and then associate it with your instance.

// image of aurora cluster parameter group

Step 2: Edit the custom parameter group, and set:

binlog_format -> "ROW"

log_bin_trust_function_creators -> 1

// image of settings

Step 3: Update your Aurora cluster to use the new parameter group

// Image of modify cluster params

Make sure you choose "Apply Immediately" to apply the changes immediately.

// Image of apply now

Step 4: Restart your Aurora instance for the changes to take affect. You'll know that the changes have taken affect when the status of your Aurora Instance Parameter Group changes to "In Sync".

// Image of of Params synced

Step 5: Verify that all the new configurations are enabled by running the following commands:

-- Required configuration: ON
SHOW VARIABLES LIKE 'log_bin';

-- Required configuration: ON
SHOW VARIABLES LIKE 'log_bin_trust_function_creators';

-- Required configuration: ROW
SHOW VARIABLES LIKE 'binlog_format';

Configure Retention Policy

Step 1: Edit the Aurora retention policy:

CALL mysql.rds_set_configuration('binlog retention hours', 3);

Step 2: Verify that the retention policy is set correctly:

-- Value should be 1 hour or bigger
CALL mysql.rds_show_configuration();

Configure Your Database - Self Serve

To check if your Aurora instance is already configured to work with Epsio, you can run the following commands:

-- Required configuration: ON
SHOW VARIABLES LIKE 'log_bin';

-- Required configuration: ROW
SHOW VARIABLES LIKE 'binlog_format';

-- Required configuration: ON
SHOW VARIABLES LIKE 'log_bin_trust_function_creators';

If any of the above do not show the required configuration, follow the following steps:

Step 1: Enable binlog (only if log_bin is OFF or binlog format is not ROW) - edit your mysql conf file and add the following configurations

server-id                  = 223344
log_bin                    = mysql-bin
binlog_format              = ROW
binlog_row_image           = FULL
binlog_expire_logs_seconds  = 864000
For the above changes to take effect, you must restart your mysql server.

Step 2: Enable log_bin_trust_function_creators

SET PERSIST log_bin_trust_function_creators = 1;

Step 3: Verify that all the new configurations are enabled by running the following commands:

-- Required configuration: ON
SHOW VARIABLES LIKE 'log_bin';

-- Required configuration: ROW
SHOW VARIABLES LIKE 'binlog_format';

-- Required configuration: ON
SHOW VARIABLES LIKE 'log_bin_trust_function_creators';

Configure Your Database - RDS

To check if your RDS instance is already configured to work with Epsio, you can run the following commands:

-- Required configuration: ON
SHOW VARIABLES LIKE 'log_bin';

-- Required configuration: ON
SHOW VARIABLES LIKE 'log_bin_trust_function_creators';

-- Required configuration: ROW
SHOW VARIABLES LIKE 'binlog_format';

-- binlog retention hours Value should be 1 hour or bigger
CALL mysql.rds_show_configuration();
If any of the above does not show the required configuration, follow the steps below to reconfigure.

Configure binary logging

Step 1: Create a new paramter group To set parameter group for your instance, create a custom DB parameter group and then associate it with your instance.

// image of RDS parameter group

Step 2: Edit the custom parameter group, and set:

binlog_format -> "ROW"

log_bin_trust_function_creators -> 1

// image of settings

Step 3: Update your RDS instance to use the new parameter group

// Image of modify cluster params

Make sure you choose "Apply Immediately" to apply the changes immediately.

// Image of apply now

Step 4: Restart your Aurora instance for the changes to take affect. You'll know that the changes have taken affect when the status of your Aurora Instance Parameter Group changes to "In Sync".

// Image of of Params synced

Step 5: Verify that all the new configurations are enabled by running the following commands:

-- Required configuration: ON
SHOW VARIABLES LIKE 'log_bin';

-- Required configuration: ON
SHOW VARIABLES LIKE 'log_bin_trust_function_creators';

-- Required configuration: ROW
SHOW VARIABLES LIKE 'binlog_format';

Configure Retention Policy

Step 1: Edit the Aurora retention policy:

CALL mysql.rds_set_configuration('binlog retention hours', 3);

Step 2: Verify that the retention policy is set correctly:

-- Value should be 1 hour or bigger
CALL mysql.rds_show_configuration();