MySQL Utilities should be installed for using the mysqlbinlogmove script. Refer to Chapter 1, MySQL 8.0 – Installing and Upgrading, for installation steps.
- Stop the MySQL server:
shell> sudo systemctl stop mysql
- Start the mysqlbinlogmove utility. If you want to change the binary logs from /data/mysql/binlogs to /binlogs, the following command should be used. If your base name is not default, you have to mention your base name through the --bin-log-base name option:
shell> sudo mysqlbinlogmove --bin-log-base name=server1 --binlog-dir=/data/mysql/binlogs /binlogs## Moving bin-log files...# - server1.000001# - server1.000002# - server1.000003# - server1.000004# - server1.000005##...done.#
- Edit the my.cnf file and update ...