Bug #110107 InnoDB Data File Error
Submitted: 17 Feb 11:59 Modified: 17 Feb 13:25
Reporter: Oğuz Çelikdemir Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:8.0.32 OS:Ubuntu (22.04)
Assigned to: CPU Architecture:x86
Tags: innodb, innodb_data_file_path

[17 Feb 11:59] Oğuz Çelikdemir
Description:
When we set innodb_data_file_path as follow:

user = mysql
datadir = /var/lib/mysql
innodb_data_home_dir = /var/lib/INNODB
innodb_data_file_path = INNODBDATA:64M:autoextend

mysql throw an error message like below:

2023-02-17T13:39:46.419879Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32-0ubuntu0.22.04.2) starting as process 2297
2023-02-17T13:39:46.425349Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-02-17T13:39:46.455377Z 1 [ERROR] [MY-012592] [InnoDB] Operating system error number 2 in a file operation.
2023-02-17T13:39:46.455409Z 1 [ERROR] [MY-012593] [InnoDB] The error means the system cannot find the path specified.
2023-02-17T13:39:46.455417Z 1 [ERROR] [MY-012594] [InnoDB] If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2023-02-17T13:39:46.455426Z 1 [ERROR] [MY-012646] [InnoDB] File /var/lib/INNODB/INNODBDATA: 'open' returned OS error 71. Cannot continue operation
2023-02-17T13:39:46.455433Z 1 [ERROR] [MY-012981] [InnoDB] Cannot continue operation.
2023-02-17T13:39:46.949167Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32-0ubuntu0.22.04.2) starting as process 2321
2023-02-17T13:39:46.954890Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

I tried to create a directory with mysql user in "/var/lib/mysql" as well as outside the "/var/lib/mysql" but no success, still coming error messages.

The MySQL data directory contains as follows:
root@intranet:/var/lib/mysql# ls -l
total 78292
-rw-r----- 1 mysql mysql       56 Feb 17 13:36  auto.cnf
-rw-r----- 1 mysql mysql      180 Feb 17 13:37  binlog.000001
-rw-r----- 1 mysql mysql      404 Feb 17 13:37  binlog.000002
-rw-r----- 1 mysql mysql      180 Feb 17 13:37  binlog.000003
-rw-r----- 1 mysql mysql       48 Feb 17 13:37  binlog.index
-rw------- 1 mysql mysql     1705 Feb 17 13:36  ca-key.pem
-rw-r--r-- 1 mysql mysql     1112 Feb 17 13:36  ca.pem
-rw-r--r-- 1 mysql mysql     1112 Feb 17 13:36  client-cert.pem
-rw------- 1 mysql mysql     1705 Feb 17 13:36  client-key.pem
-rw-r--r-- 1 root  root         0 Feb 17 13:37  debian-5.7.flag
-rw-r----- 1 mysql mysql   196608 Feb 17 13:37 '#ib_16384_0.dblwr'
-rw-r----- 1 mysql mysql  8585216 Feb 17 13:36 '#ib_16384_1.dblwr'
-rw-r----- 1 mysql mysql     3410 Feb 17 13:37  ib_buffer_pool
-rw-r----- 1 mysql mysql 12582912 Feb 17 13:37  ibdata1
drwxrwxr-x 2 mysql mysql     4096 Feb 17 13:39  INNODB
drwxr-x--- 2 mysql mysql     4096 Feb 17 13:37 '#innodb_redo'
drwxr-x--- 2 mysql mysql     4096 Feb 17 13:37 '#innodb_temp'
drwxr-x--- 2 mysql mysql     4096 Feb 17 13:36  mysql
-rw-r----- 1 mysql mysql 25165824 Feb 17 13:37  mysql.ibd
drwxr-x--- 2 mysql mysql     4096 Feb 17 13:36  performance_schema
-rw------- 1 mysql mysql     1705 Feb 17 13:36  private_key.pem
-rw-r--r-- 1 mysql mysql      452 Feb 17 13:36  public_key.pem
-rw-r--r-- 1 mysql mysql     1112 Feb 17 13:36  server-cert.pem
-rw------- 1 mysql mysql     1705 Feb 17 13:36  server-key.pem
drwxr-x--- 2 mysql mysql     4096 Feb 17 13:36  sys
-rw-r----- 1 mysql mysql 16777216 Feb 17 13:37  undo_001
-rw-r----- 1 mysql mysql 16777216 Feb 17 13:37  undo_002

How to repeat:
Basic installation of the Ubuntu server. There aren't any extra package, just install the MySQL Server.
[17 Feb 13:25] MySQL Verification Team
Hi Mr. Celikdemir,

Thank you for your bug report.

However, this is not a bug.

You have to create yourself each tablespace and each table and set all arguments per them, as explained in our Reference Manual.

You can not expect InnoDB to do all that work for you, just by setting the configuration file.

Not a bug.