Documentation Index
Fetch the complete documentation index at: https://docs.ahmadraza.in/llms.txt
Use this file to discover all available pages before exploring further.
MySQL Replication and Read Replica Configuration
Enable and Test Read Replica Lag
To simulate and test replication lag on a read replica, execute the following commands:-
Configure Slow Query Logging:
-
Create a Lag:
Test Logging
To test logging, use the following configuration settings:-
Enable General and Slow Query Logging:
-
Modify Parameter Group:
- You cannot modify the parameter settings of a default DB parameter group. Instead, create and modify a custom DB parameter group if the parameter is modifiable.
- Open the Amazon RDS console.
- Choose Databases from the navigation pane.
- Select the instance you want to associate with the DB parameter group.
- Choose Modify.
- From the Database options section, select the DB parameter group you want to associate with the DB instance.
Manage Replication Delay
-
Stop Replication:
-
Set Replication Delay:
-
Start Replication:
Show Logs
To view the logs, use the following queries:-
General Log:
-
Slow Query Log:
/path/to/slow_query.log with the actual path where you want to store the slow query log.
Feel free to adjust the paths, parameters, or steps based on your specific requirements or environment!
