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

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

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