group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #35347
[Bug 1680115] Re: mysql-systemd-start script does not work with datadir other than /var/lib/mysql
** Also affects: mysql-8.0 (Ubuntu Xenial)
Importance: Undecided
Status: New
** Changed in: mysql-8.0 (Ubuntu)
Status: Incomplete => Invalid
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1680115
Title:
mysql-systemd-start script does not work with datadir other than
/var/lib/mysql
Status in Ubuntu Server Guide:
Invalid
Status in mysql-8.0 package in Ubuntu:
Invalid
Status in mysql-8.0 source package in Xenial:
New
Bug description:
The /usr/share/mysql/mysql-systemd-start script does not work with
datadir other than /var/lib/mysql because the datadir path is
hardcoded in the script.
Fix:
Replace...
sanity () {
if [ ! -r /etc/mysql/my.cnf ]; then
echo "MySQL configuration not found at /etc/mysql/my.cnf. Please create one."
exit 1
fi
if [ ! -d /var/lib/mysql ] && [ ! -L /var/lib/mysql ]; then
echo "MySQL data dir not found at /var/lib/mysql. Please create one."
exit 1
fi
if [ ! -d /srv/data/mysql/mysql ] && [ ! -L /srv/data/mysql/mysql ]; then
echo "MySQL system database not found. Please run mysql_install_db tool."
exit 1
fi
}
...with...
sanity () {
if [ ! -r /etc/mysql/my.cnf ]; then
echo "MySQL configuration not found at /etc/mysql/my.cnf. Please create one."
exit 1
fi
_DATADIR="$(mysqld --verbose --help | grep -i '^datadir' | awk
'{print $2}' | sed 's|/$||')"
if [ ! -d $_DATADIR ] && [ ! -L _DATADIR ]; then
echo "MySQL data dir not found at /var/lib/mysql. Please create one."
exit 1
fi
if [ ! -d $_DATADIR ] && [ ! -L ${_DATADIR}/mysql ]; then
echo "MySQL system database not found. Please run mysql_install_db tool."
exit 1
fi
}
To manage notifications about this bug go to:
https://bugs.launchpad.net/serverguide/+bug/1680115/+subscriptions