Fix for older mariadb versions

This commit is contained in:
Tobias Herre 2023-10-28 14:02:30 +02:00
parent 1733552f7e
commit c72ad8ef06
1 changed files with 5 additions and 1 deletions

View File

@ -110,7 +110,11 @@ vars:
"$(mysql.default_datadir)");
type_mariadb::
"install_db_cmd" string => "if [ ! -d $(datadir)/mysql ]; then $(mysql.bin_dir)/mariadb-install-db --user=$(mysql.user)>/dev/null ; fi";
"install_db_exe" string => ifelse(fileexists("$(mysql.bin_dir)/mysql_install_db"),
"$(mysql.bin_dir)/mysql_install_db",
"$(mysql.bin_dir)/mariadb-install-db");
"install_db_cmd" string => "if [ ! -d $(datadir)/mysql ]; then $(install_db_exe) --user=$(mysql.user)>/dev/null ; fi";
type_mysql8::
"install_db_cmd" string => "if [ ! -d $(datadir)/mysql ]; then $(mysql.mysqld_cmd) --initialize-insecure --user=$(mysql.user); fi";