mysql-systemd-start script does not work with datadir other than /var/lib/mysql
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Server Guide |
Invalid
|
Undecided
|
Unassigned | ||
mysql-8.0 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Xenial |
New
|
Undecided
|
Unassigned |
Bug Description
The /usr/share/
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/
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=
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
}
Changed in mysql-8.0 (Ubuntu): | |
status: | Incomplete → Invalid |
There is no reference to this script in the mysql section of the server guide. Presuming this bug was mis-filed maybe?