charlescng / docker-containers

Docker containers and unRAID docker templates
10 stars 11 forks source link

Fix issues related to MariaDB 10.4 -> 10.5 upgrade #8

Closed charlescng closed 4 years ago

charlescng commented 4 years ago

Fix MariaDB configuration problems when upgrading MariaDB from 10.4 to 10.5.

The settings modified in the Dockerfile moved from/etc/mysql/my.cnf to /etc/mysql/mariadb.conf.d/50-server.cnf. This caused MariaDB to run as the mysql user instead of the nobody user. Some users experienced permission issues with the database files.

2020-08-13 18:02:43 0 [ERROR] mariadbd: File '/config/databases/aria_log_control' not found (Errcode: 13 "Permission denied")
2020-08-13 18:02:43 0 [ERROR] mariadbd: Got error 'Can't open file' when trying to use aria control file '/config/databases/aria_log
_control'
2020-08-13 18:02:43 0 [ERROR] Plugin 'Aria' init function returned error.
2020-08-13 18:02:43 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2020-08-13 18:02:43 0 [Note] InnoDB: Using Linux native AIO
2020-08-13 18:02:43 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2020-08-13 18:02:43 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2020-08-13 18:02:43 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-08-13 18:02:43 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-08-13 18:02:43 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-08-13 18:02:43 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loade
d
2020-08-13 18:02:43 0 [ERROR] Failed to initialize plugins.
2020-08-13 18:02:43 0 [ERROR] Aborting

Also, make a change is to always change the database files owner to nobody:users and permissions to 755 in the mariadb.sh script, in case some files are still owned by the mysql user.