MySQL, MariaDB

[MySQL] [InnoDB] Failed to create check sector file, errno:13 Please confirm O_DIRECT is supported 오류 및 해결

SungWookKang 2023. 11. 2. 15:16
반응형

[MySQL] [InnoDB] Failed to create check sector file, errno:13 Please confirm O_DIRECT is supported 오류 및 해결

 

l  Version : MySQL 8.0

 

MySQL을 시작할 때, 정상적으로 서비스가 시작되지 않았으며 아래와 같은 오류 로그를 확인할 수 있었다.

[ERROR] [MY-012655] [InnoDB] Failed to create check sector file, errno:13 Please confirm O_DIRECT is supported and remove the file /var/lib/check_sector_size if it exists.

 

Error 13에 대해서 찾아보면 공식 매뉴얼에는 퍼미션에 관련된 내용으로 안내 되어 있다.

l  https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/starting-server-troubleshooting.html

If you get Errcode 13 (which means Permission denied) when starting mysqld, this means that the privileges of the data directory or its contents do not permit server access. In this case, you change the permissions for the involved files and directories so that the server has the right to use them. You can also start the server as root, but this raises security issues and should be avoided.

 

하지만 해당 이슈는 mysql.cnf에 설정된 innodb_data_home_dir 파라메터에 설정된 경로에서 마지막 슬래시(/)가 누락되어 발생한 오류이다. 해결 방법은 경로 마지막에 슬래시(/)만 추가하면 된다.

 

my.cnf

innodb_data_home_dir = /var/lib/mysql/

 

 

 

2023-11-02 / Sungwook Kang / http://sungwookkang.com

 

MySQL, innodb, o_direct, error13

반응형