Skip to content

Getting Started

Jorge Castro edited this page Mar 26, 2022 · 10 revisions

1. The tools to be used for the migration:

  • MySQL Shell 8.0.26 - on Windows

  • MySQL Shell Dump & Load utilities

  • AWS account

  • AWS CLI v2 + JMESPath query language for JSON

On the AWS CLI I have set the default outputs as json however I will specify to --output table option so the output is more aesthetically pleasing whenever possible.

2. Important considerations before loading the DB to AWS

  • Make sure Local_infile configuration needs to be enabled.

To check the status of the Local_infile variable:

show variables like 'local_infile';
To turn ON the variable:
SET PERSIST local_infile = 1;
  • A common error message when loading databases to AWS RDS is:

⚠️
Error processing schema •sakila• : You do not have the SUPER privilege and binary logging is enabled (you want to use the less safe variable) il.10adDump: You do not have the SUPER privilege and binary logging is enabled (you want to use t he less safe 10 variable) (MYSQLSH 1419) STUDENT > disconnect

159787786 84ca87ab ade4 4e3b 9dba 1c28248e6055

ℹ️

Cause:

The error arises when we try to import functions or triggers. The error arises only if the binary logging option, which is required for the replication, is turned on for the MySQL server.

Solutions:

  • SUPER user privileges are required on the AWS RDS user running the import to be able to load the database with user defined SQL code. This can be achieved by creating a new Parameter Group, adding the log_bin_trust_function_creators and set its value to ’1′.

The above steps should only be done temporarily in order to import databases. Once the import is complete, we should replace the custom parameter-group my the default one. This will ensure that the AWS RDS instance remains secure.The above steps should only be done temporarily in order to import databases. Once the import is complete, we should replace the custom parameter-group my the default one. This will ensure that the AWS RDS instance remains secure.

In this case I want to be able to import the Sakila database with all the store procedures, triggers and functions it has already done by me.


Clone this wiki locally