-
Notifications
You must be signed in to change notification settings - Fork 0
Before provisioning the AWS RDS

We need this information in order to authorize connection to the AWS database port 3306
from our work or home. So we use the following command and we make a note of it:
(Invoke-WebRequest ifconfig.me/ip).Content.Trim()
Here we verify the MySQL engine supported versions by AWS RDS, our MySQL database is v8.0.26
aws rds describe-db-engine-versions `
--engine mysql `
--engine-version 8.0.26 `
--query "DBEngineVersions[*].[Engine,EngineVersion,DBEngineDescription]"
To be able to create a new parameter-group, the parameter-group-family is required.
aws rds describe-db-parameter-groups
-
What is a parameter-group and Why do we need to create a new one?
For AWS RDS instances, we manage our database engine configuration through the use of parameters in a DB parameter group
. DB parameter groups act as a container for engine configuration values that are applied to one or more DB instances.
In order to set wider privileges to the master account (SUPER user) and be able to load the backup, we have to create a new parameter-group. To modify the default existing parameter group is not allowed by AWS. It is best practice to create a new parameter-group, modify the parameter we need, then associate the new parameter-group to the new RDS instance.
Amazon RDS is a managed service that does not provide SYS access (SUPER privileges). If binary logging is enabled on our MySQL DB instance, we need to set the log_bin_trust_function_creators
parameter to true in the custom DB parameter group.
Once we are done with the migration, we can de-associate and parameter from the RDS instance and keep the default PG.
To create a new parameter-group:
aws rds create-db-parameter-group `
--db-parameter-group-name "superuser" `
--db-parameter-group-family "mysql8.0" `
--description "restore db from dump"
To associate the parameter log_bin_trust_function_creators
and set its value to 1.
aws rds modify-db-parameter-group `
--db-parameter-group-name "superuser" `
--parameters "ParameterName='log_bin_trust_function_creators', `
ParameterValue=1,ApplyMethod=immediate"
After modifying a parameter group AWS recommends to wait at least 5 minutes before we proceed to create the new instance.
This allows Amazon RDS to fully complete the create action before the parameter group is used as the default for a new DB instance. However we want to add this new parameter-group instead of using it as default when creating the DB instance. This is why we have to modify the instance to add the parameter-group.
