Skip to content

Commit 09f9177

Browse files
committed
Bug#22252900 SERVICE START FAILED TO CREATE DATABASE IF IT DOESN'T EXISTS(UBUNTU1510)
The systemd script used on Ubuntu 15.10 and Debian8 would create $DATADIR/mysql if it didn't exist, and then it would try to run --initialize, which would fail because $DATADIR was not empty. Removed creation of $DATADIR/mysql
1 parent 1293f37 commit 09f9177

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

packaging/deb-jessie/extra/mysql-systemd-start

-7
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@ sanity () {
6161
chmod 750 ${MYSQLKEYRING}
6262
fi
6363

64-
if [ ! -d "${MYSQLDATA}/mysql" -a ! -L "${MYSQLDATA}/mysql" ];
65-
then
66-
mkdir ${MYSQLDATA}/mysql
67-
chown mysql:mysql ${MYSQLDATA}/mysql
68-
chmod 750 ${MYSQLDATA}/mysql
69-
fi
70-
7164
if [ ! "$(ls -A ${MYSQLDATA}/mysql)" ];
7265
then
7366
su - mysql -s /bin/bash -c "/usr/sbin/mysqld --initialize-insecure=on 2>&1 > /dev/null"

packaging/deb-wily/extra/mysql-systemd-start

-7
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@ sanity () {
6161
chmod 750 ${MYSQLKEYRING}
6262
fi
6363

64-
if [ ! -d "${MYSQLDATA}/mysql" -a ! -L "${MYSQLDATA}/mysql" ];
65-
then
66-
mkdir ${MYSQLDATA}/mysql
67-
chown mysql:mysql ${MYSQLDATA}/mysql
68-
chmod 750 ${MYSQLDATA}/mysql
69-
fi
70-
7164
if [ ! "$(ls -A ${MYSQLDATA}/mysql)" ];
7265
then
7366
su - mysql -s /bin/bash -c "/usr/sbin/mysqld --initialize-insecure=on 2>&1 > /dev/null"

0 commit comments

Comments
 (0)