Increasing the InnoDB system tablespace

Assuming that innodb_data_file_path is ibdata1:50M:autoextend, the size has reached 76 MB, and your disk is just 100 MB, you can add another disk and configure to add another tablespace onto the new disk:

  1. Stop MySQL server:
shell> sudo systemctl stop mysql
  1. Check the size of the existing ibdata1 file:
shell> sudo ls -lhtr /var/lib/mysql/ibdata1 -rw-r----- 1 mysql mysql 76M Oct  6 13:33 /var/lib/mysql/ibdata1
  1. Mount the new disk. Assuming it is mounted on /var/lib/mysql_extend, change the ownership to mysql; make sure that the file is not already created. If you are using AppArmour or SELinux, make sure you set the alias or context correctly:
shell> sudo chown mysql:mysql /var/lib/mysql_extendshell> ...

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.