Parameter Group

❓ What is parameter group in RDS?
πŸ• It's a group of variables that can be used on the database(s). These variables are pre-defined. We can use these variables to our advantage. Ex: by enabling log variable I can get logs. can set maximum connection my DB can have ...MAX_CONNECTIONS = 500, etc.

❓ For enhanced monitoring what parameters I need to use?
πŸ• General_log = 1:
The default value is 0 or no logging. These are just general logs

πŸ• Slow_query_log = 1:
The default value is 0 or no logging., it's a boolean param. This should be enabled for enhance monitoring log. This simply means query that takes longer time to process, give me logs of them. Now by longer time means the values we set could be 0.001 sec or 60 sec etc. We set this value in the below parameter.
πŸ• Long_query_time = value_in_sec:
To log queries that run longer. This should be enabled for enhance monitoring's kinda like timer.

πŸ• log_output = FILE:
To write both the general and the slow query logs to the file system and allow viewing these logs from the Amazon RDS console. It could be of the form file or
πŸ• log_output =TABLE:
default value writes the queries to a table so you can view these logs with a query.

πŸ• Also AWS RDS by default it gives MySQL error log. To get slow query logs / general logs need to set parameters in parameter group
MySQL error logs are found only during starting up of the system and shutdown, not when something write/read entries are happening.

❓ How can I edit parameter group value?
πŸ• Default parameter group cannot be changed.
πŸ• It's a good practice to create a parameter group first and while creating RDS cluster add the parameter group created before.
Custome parameter group: i.e. created by you:
πŸ• Any updates are done then changes apply to all DB instances that are associated with that parameter group.
πŸ•Changes done in the dynamic parameter, gets applied immediately regardless of the Apply Immediately setting.
πŸ•Changes done in the static parameter gets applied only when you manually reboot the DB instance.
πŸ• If you update Parameter groups itself ex: from ParameterGroup: A to ParameterGroup: B changes take effect only when it is rebooted manually.
πŸ•If it shows pending-reboot most likely changes aren't reflected in DB instances so manually reboot it
πŸ• Back up your data before modifying a DB parameter group.