diff options
author | Michal Hrusecky <michal.hrusecky@turris.com> | 2020-10-12 10:50:51 +0200 |
---|---|---|
committer | Michal Hrusecky <michal.hrusecky@turris.com> | 2020-10-13 08:58:29 +0200 |
commit | 7c628580a6ecaad9b044191dc24661fc291fb42e (patch) | |
tree | 3d49849e46d3d2ea1a54f4cbfeab452b58760162 | |
parent | 233398ced53bcf42eba58d840175db4362eb9ce6 (diff) |
mariadb: Use defaults and change default datadir
Use /srv/mysql as default datadir as /var/lib/mysql is in tmpfs. This
doesn't affect any existing setup as up till now it had to be always
specified in configuration. That is addressed in the second part of this
commit - init script now uses even defaults as compiled in MariaDB so
not everything has to be specified in configuration file.
Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
-rw-r--r-- | utils/mariadb/Makefile | 2 | ||||
-rw-r--r-- | utils/mariadb/files/mysqld.init | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/utils/mariadb/Makefile b/utils/mariadb/Makefile index 321ee70a9..162b0860a 100644 --- a/utils/mariadb/Makefile +++ b/utils/mariadb/Makefile @@ -380,7 +380,7 @@ CMAKE_OPTIONS += \ -DINSTALL_SQLBENCHDIR="" \ -DINSTALL_SUPPORTFILESDIR=share/mariadb \ -DINSTALL_UNIX_ADDRDIR=$(MARIADB_SOCKET) \ - -DMYSQL_DATADIR=/var/lib/mysql \ + -DMYSQL_DATADIR=/srv/mysql \ -DMYSQL_UNIX_ADDR=$(MARIADB_SOCKET) \ -DSKIP_TESTS=ON \ -DWITH_DEBUG=OFF \ diff --git a/utils/mariadb/files/mysqld.init b/utils/mariadb/files/mysqld.init index 3e3538907..4f23a01de 100644 --- a/utils/mariadb/files/mysqld.init +++ b/utils/mariadb/files/mysqld.init @@ -22,11 +22,7 @@ export HOME="/etc/mysql" cd / mysqld_get_param() { - $MYSQLD --print-defaults \ - | tr " " "\n" \ - | grep -- "--$1" \ - | tail -n 1 \ - | cut -d= -f2 + /usr/bin/mysqld --help --verbose | sed -n 's|^'"$1"'[[:blank:]]\+||p' } # Checks if a server is running and accessible. |