Disabling Doublewrite of the MySQL Database
After modifying the [mysqld] parameters, restart the database for the modification to take effect.
- Open the database configuration file. In this example, the configuration file path is /etc/my.cnf.
1vim /etc/my.cnf - Press i to enter the insert mode, find the following parameters, and modify them. If the following parameters do not exist, add them to the file.
[mysqld] innodb_flush_method=O_DIRECT innodb_doublewrite=0
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Restart the database for the configuration to take effect.
1service mysql restart
- Verify that the atomic write feature is successfully configured.
- Run the following command to query the atomic write status:
1hioadm atomicwrite -d nvme0n1
If the following information is displayed, atomic write has been enabled.

- Check that the doublewrite and flush_method parameters are successfully modified in the database.
1 2
show variables like '%flush_method%'; show variables like '%doublewrite%';

- Run the following command to query the atomic write status:
Parent topic: Installing and Configuring the MySQL Database
