Hello.
Up to now, I can install a mariadb server using non standard options.
The initial database is left with unmodified options (options set when installing mariadb : zypper in mariadb)
The new databases are started with systemctl start mariadb@%i ( using ExecStart=/usr/bin/mysqld_multi start %i )
The databases application are installed this way
APP_1 is installed in /bdd/bd_1/app_1/APP_1
Socket file and Pid files are in : /bdd/bd_1/app_1/sock
Logs are in : /var/log/mysql/APP_1/
APP_2 is installed in /bdd/bd_2/app_2/APP_2
Socket file and Pid files are in : /bdd/bd_2/app_sock
Logs are in : /var/log/mysql/APP_1/
And so on.
Taking APP_1 as example :
Operating system files permissions are :
/bdd/bd_1/app_1 is owned by mysql:mysql
/bdd/bd_1/app_1/sock is owned by mysql:mysql
/bdd/bd_1/app_1/APP_1 is owned by ‘app_1:app_1’ ( app_1 is a system user in group app_1 without login )
/var/log/mysql/APP_1/*.log are owned by mysql:mysql
The database system files are created this way :
mysql_install_db --defaults-file="/etc/my.cnf.d/cfg_1.cnf" --user=app_1 --datadir=/bdd/bd_1/app_1/APP_1
The problem is that the database does not start because access forbiden :
2021-04-01 20:02:02 0 [ERROR] mysqld: File '/bdd/bd_1/app_1/APP_1/aria_log_control' not found (Errcode: 13 "Permission denied")
2021-04-01 20:02:02 0 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/bdd/bd_1/app_1/APP_1/aria_log_control'
2021-04-01 20:02:02 0 [ERROR] Plugin 'Aria' init function returned error.
2021-04-01 20:02:02 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2021-04-01 20:02:02 0 [Note] InnoDB: Using Linux native AIO
2021-04-01 20:02:02 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2021-04-01 20:02:02 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2021-04-01 20:02:02 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-04-01 20:02:02 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-04-01 20:02:02 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-04-01 20:02:02 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2021-04-01 20:02:02 0 [ERROR] Failed to initialize plugins.
2021-04-01 20:02:02 0 [ERROR] Aborting
–
Starting MariaDB servers
210401 20:02:02 mysqld_safe Logging to '/var/log/mysql/APP_1/APP_1_error.log'.
210401 20:02:02 mysqld_safe Starting mysqld daemon with databases from /bdd/bd_1/app_1/APP_1
mysqld_multi log file version 2.20; run: Thu Apr 1 20:02:02 2021
Stopping MariaDB servers
I would like all the apps system files not owned by mysql and have an admistrative user not mysql.
Any help is welcome.