O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

MySQL Utilities should be installed for using the mysqlbinlogmove script. Refer to Chapter 1, MySQL 8.0 – Installing and Upgrading,  for installation steps.

  1. Stop the MySQL server:
shell> sudo systemctl stop mysql
  1. 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.#
  1. Edit the my.cnf file and update ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required