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...

  1. Check the sizes of the current files:
shell> sudo ls -lhtr /var/lib/mysql/ib_logfile*-rw-r-----. 1 mysql mysql 48M Oct  7 10:16 /var/lib/mysql/ib_logfile1-rw-r-----. 1 mysql mysql 48M Oct  7 10:18 /var/lib/mysql/ib_logfile0
  1. Stop the MySQL server and make sure that it shuts down without errors:
shell> sudo systemctl stop mysqld
  1. Edit the configuration file:
shell> sudo vi /etc/my.cnf[mysqld]innodb_log_file_size=128Minnodb_log_files_in_group=4
  1. Start the MySQL server:
shell> sudo systemctl start mysqld
  1. You can verify what MySQL did in the log file:
shell> sudo less /var/log/mysqld.log2017-10-07T11:09:35.111926Z 1 [Warning] InnoDB: Resizing redo log from 2*3072 to 4*8192 pages, LSN=2496336082017-10-07T11:09:35.213717Z 1 ...

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