Browse Source

mariadb: fix /etc/mysql setup

- create directory /etc/mysql/conf.d as without it the server refuses to
  start
- correct the path to my.cnf in the init script

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
lilik-openwrt-22.03
Sebastian Kemper 6 years ago
parent
commit
3bdaa522df
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      utils/mariadb/Makefile
  2. +1
    -1
      utils/mariadb/files/mysqld.init

+ 1
- 1
utils/mariadb/Makefile View File

@ -453,7 +453,7 @@ define Package/mariadb-server/install
$(INSTALL_DIR) $(1)/usr/bin
$(foreach b,$(MARIADB_SERVER),$(call Package/mariadb/install/bin,$(1),$(b));)
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/mysql
$(INSTALL_DIR) $(1)/etc/mysql/conf.d
$(INSTALL_BIN) files/mysqld.init $(1)/etc/init.d/mysqld
$(INSTALL_CONF) conf/my.cnf $(1)/etc/mysql
$(INSTALL_DIR) $(1)$(PLUGIN_DIR)


+ 1
- 1
utils/mariadb/files/mysqld.init View File

@ -10,7 +10,7 @@ SERVICE_STOP_TIME=9
PROG='/usr/bin/mysqld'
start() {
local conf='/etc/my.cnf'
local conf='/etc/mysql/my.cnf'
local datadir="$( sed -nE "s/^\s*datadir\s*=\s*('([^']*)'|\x22([^\x22]*)\x22|(.*\S))\s*$/\2\3\4/p" "$conf" )"
[ -d "$datadir" ] || {


Loading…
Cancel
Save