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>
-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 \
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.