INNODB_SYS_TABLESPACES

The size of the file is also available in the INNODB_TABLESPACES table:

mysql> SELECT * FROM INNODB_TABLESPACES WHERE NAME='employees/employees'\G*************************** 1. row *************************** SPACE: 118 NAME: employees/employees FLAG: 16417 ROW_FORMAT: Dynamic PAGE_SIZE: 16384 ZIP_PAGE_SIZE: 0 SPACE_TYPE: Single FS_BLOCK_SIZE: 4096 FILE_SIZE: 32505856ALLOCATED_SIZE: 325099521 row in set (0.00 sec)

You can verify the same in the filesystem:

shell> sudo ls -ltr /var/lib/mysql/employees/employees.ibd-rw-r----- 1 mysql mysql 32505856 Jun 20 16:50 /var/lib/mysql/employees/employees.ibd

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.