Apply configuration manually for MySQL
Choose the environment that hosts MySQL. Review the MySQL permissions and the shared pre-change, verification, and recovery checks before you begin.
- Linux
- Windows
- Docker
- AWS RDS / Aurora
- GCP Cloud SQL
Before you begin
Confirm the active MySQL configuration directory, record the current settings, and plan a maintenance window and recovery path. If the destination already contains z_aiops_mysql.cnf, make a backup copy outside the active include directory. If it does not, record that the Releem file is new. The Releem Agent stores the Recommended Configuration at /opt/releem/conf/z_aiops_mysql.cnf.
Step 1: Copy Recommended Configuration to MySQL configuration folder
On Debian and Ubuntu systems, copy the generated file to /etc/mysql/conf.d/:
cp /opt/releem/conf/z_aiops_mysql.cnf /etc/mysql/conf.d/
CentOS uses the alternate directory /etc/my.cnf.d/. Confirm the active include directory before copying the file.
Step 2: Restart MySQL to apply configuration
Review the copied settings, then restart the database during the planned maintenance window. If you use MySQL 5.6.7 or earlier and the recommendation changes innodb_log_file_size, follow the special procedure below instead of this restart command.
service mysqld restart
Special case: MySQL 5.6.7 or earlier with an innodb_log_file_size change
InnoDB redo logs store changes used during crash recovery. For this version range, changing their size requires a clean shutdown and moving the old files before startup. See Changing the Number or Size of Redo Log Files in the MySQL 5.6 manual.
Before you begin, have a recoverable database backup and the previous configuration. Confirm the service name, log directory (innodb_log_group_home_dir, or datadir when unset), and number of log files (innodb_log_files_in_group). The examples use the mysql service and two files in /var/lib/mysql; use your actual service, directory, and complete file list.
- Set the shutdown mode so MySQL flushes pending changes:
mysql -e "SET GLOBAL innodb_fast_shutdown = 1"
Use your administrator account. If it requires a password, open mysql -u root -p and run the same SET GLOBAL statement at the MySQL prompt.
- Stop MySQL:
service mysql stop
Confirm that the server has stopped and its error log reports shutdown without errors. Do not move log files after a failed or forced shutdown.
- Move the old log files into an existing, empty backup directory outside the data directory. Replace the placeholder with its absolute path:
mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile1 [BACKUP_DIRECTORY]/
- Start MySQL with the recommended configuration:
service mysql start
MySQL creates new redo logs at the configured size. Keep the old files until verification completes. If startup fails, inspect the error log before retrying; do not overwrite newly created logs with old ones. Use your database backup and recovery procedure if required.
Step 3: Verify the Applied Configuration
- Check whether any settings remain restart-pending and confirm the effective database settings in MySQL.
For the redo-log change above, check
SHOW GLOBAL VARIABLES LIKE 'innodb_log_file_size';and inspect the error log for startup errors. - Confirm the database service is running and review application connectivity and errors.
- Confirm the Applied recommended configuration event on the MySQL Metrics graph, then review current metrics.
If the service does not return to its expected state, restore the backed-up z_aiops_mysql.cnf or remove the newly inserted file from the active include directory, then restart MySQL. If that recovery fails, use Rollback when applicable and contact Releem support.
Before you begin
- Do not continue until you have confirmed which
my.inifile the selected MySQL service uses. - Make a backup copy of the active
my.ini, record the current settings, and plan a maintenance window and recovery path. - Review the exact recommended settings in Releem before you copy them. After you paste them into
my.ini, check them again before you save the file.
Step 1: Copy the Recommended Configuration
- Log in to the Releem dashboard.
- Open Configuration in the Recommended Configuration block.
- Click the Copy icon to copy the recommended configuration.
Step 2: Modify the my.ini File
- Locate the active
my.inifile. It is typically underC:\Program Files\MySQL\MySQL Server X.X\my.iniorC:\ProgramData\MySQL\my.ini. - Open the file in a text editor such as Notepad.
- Paste the copied configuration at the end of the file.
- Save the file using the ANSI charset. In Notepad, choose File → Save As. In Encoding, select ANSI, then select Save.
Step 3: Restart the MySQL Database Service
- Press
Win + R, enterservices.msc, and press Enter. - Find the MySQL service, such as MySQL or MySQL80.
- Right-click the selected service and choose Restart.
Step 4: Verify the Applied Configuration
- Check whether any settings remain restart-pending and confirm the effective database settings in MySQL.
- Confirm the database service is running and review application connectivity and errors.
- Confirm the Configuration was applied successfully event on the MySQL Metrics graph, then review current metrics.
If the service does not return to its expected state, restore the backed-up my.ini and restart the selected MySQL service. If that recovery fails, use Rollback when applicable and contact Releem support.
Before you begin
Identify the persistent configuration file mounted into the target MySQL container. Make a backup or snapshot of that persistent mounted configuration, record the current settings, confirm the container name or ID, and plan a maintenance window and recovery path.
Step 1: Copy the Recommended Configuration
- Log in to the Releem dashboard.
- Open Configuration in the Recommended Configuration block.
- Click the Copy icon to copy the recommended configuration.
Step 2: Modify the my.cnf file
Identify the active my.cnf file used by the target MySQL container. Paste the copied configuration at the end of that file and confirm that the change is stored in persistent configuration.
Step 3: Restart Docker container
Before restarting, review the pasted settings and confirm that <container_name_or_id> identifies the MySQL container you intend to restart.
docker restart <container_name_or_id>
Step 4: Verify the Applied Configuration
- Check whether any settings remain restart-pending and confirm the effective database settings in MySQL.
- Confirm the database container health and review application connectivity and errors.
- Confirm the Applied recommended configuration event on the MySQL Metrics graph, then review current metrics.
If the container does not return to its expected state, restore the backup or snapshot of the persistent mounted configuration and restart the same container. If that recovery fails, use Rollback when applicable and contact Releem support.
Before you begin
Record the parameter group assigned to your RDS instance and its current parameter values. Confirm whether that group is shared by other instances. If it is shared, stop until the change is approved for every affected instance, or use a dedicated parameter group for the target instance. Plan the application timing and recovery path. Recording it does not guarantee that every change can be reversed.
For Aurora MySQL, record both the attached custom DB instance parameter group and custom DB cluster parameter group. Check all instances and clusters that share either group and approve that full scope. A recommended setting can belong to either group. Both groups must be attached before applying recommendations, and default groups cannot be modified. If you use Releem's Agent application instead of this manual procedure, only the writer Agent modifies cluster parameters and it needs rds:ModifyDBClusterParameterGroup access. See Aurora installation.
Step 1: Modify the Parameter Group in AWS RDS
- Log in to the AWS Management Console.
- Navigate to the RDS Dashboard.
- Select Parameter Groups from the left-hand menu under Databases.
- Select your parameter group (the custom instance or cluster group targeted by the recommendation) and choose Edit Parameters.
- Update the parameters based on the recommended configuration from the Releem Dashboard.
- Save the changes.
For Aurora MySQL, edit each recommended setting in the applicable instance or cluster group. Confirm the parameter belongs to that group and record whether AWS requires a reboot.
Step 2: Apply the Parameter Group to Your RDS Instance
- Return to the RDS Dashboard and select your database instance.
- Click on the Modify button.
- In Database options, select the updated parameter group.
- Choose whether to apply the changes immediately or during the next maintenance window.
- Save the changes.
These steps attach the instance group. For Aurora MySQL, the DB cluster parameter group is attached to the cluster, not to an instance:
- In the RDS Dashboard, open Databases and select the DB cluster (the regional cluster row above its instances).
- Choose Modify.
- Under Additional configuration, select the updated custom group as the DB cluster parameter group.
- Choose whether to apply the change immediately or during the next maintenance window, and save it.
Confirm both the instance group and cluster group are attached to the intended resources. Coordinate timing for all affected cluster members when changing shared cluster settings.
Step 3: Reboot the RDS Instance
Check for pending-reboot on the affected instance or cluster parameters; dynamic changes to an attached group may take effect without a reboot. When a reboot is required, coordinate the reboot with the application timing you chose in Step 2. At the planned time, select each affected instance and choose Actions → Reboot. For an Aurora cluster parameter, that includes the writer and every reader in the cluster.
Step 4: Verify the Applied Configuration
- Check the RDS or Aurora instance and group status for pending-reboot settings and confirm the effective database settings in MySQL after any required reboot. For Aurora cluster changes, verify the affected writer and readers.
- Confirm the database instance health and review application connectivity and errors.
- Confirm the Applied recommended configuration event on the MySQL Metrics graph, then review current metrics.
If the instance does not return to its expected state, reassign the previous parameter group or restore the recorded parameter values. Reboot the instance if the restored settings require it, then repeat the health and effective-value checks. For additional help, contact Releem support.
Before you begin
Record each current database flag and whether each recommended flag is new. Before you change the instance, decide whether to apply the changes immediately or during the next maintenance window, if that option is available. Plan how you will restore the previous flags.
Step 1: Get the Recommended Configuration
- Log in to the Releem dashboard.
- Open Configuration in the Recommended Configuration block.
- Review the recommended parameters that need to be applied as database flags.
Step 2: Configure Database Flags in GCP Cloud SQL
- Log in to the Google Cloud Console.
- Navigate to the Cloud SQL Instances page.
- Select the project that contains your Cloud SQL instance.
- Click on your MySQL instance name.
- Click the Edit button.
- Scroll down to the Flags section.
- Select Add item for a new flag, or modify an existing flag. Set the value shown in the recommendation.
- Choose the application timing available for your instance.
- Click Save.
Step 3: Apply the Changes
Cloud SQL may automatically restart the instance if required. Wait for the instance to complete the restart process before checking the result.
Step 4: Verify the Applied Configuration
Confirm the flags in Google Cloud
Open Database flags and confirm the flags have been applied. Check for pending restart requirements, then confirm the effective database settings in MySQL.
Verify the application event in Releem
Confirm the Applied recommended configuration event on the MySQL Metrics graph, then review current metrics. Also confirm the database instance health and review application connectivity and errors.
Database flags are persisted until you manually remove them. Some flags may require the instance to be restarted before they become effective.
If the instance does not return to its expected state, restore each previous flag value and remove any newly added flag, then select Save. Restart the instance if the restored flags require it, and repeat the health and effective-value checks. For additional help, contact Releem support.