Skip to content

Commit

Permalink
Bug#22252900 SERVICE START FAILED TO CREATE DATABASE IF IT DOESN'T EX…
Browse files Browse the repository at this point in the history
…ISTS(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
  • Loading branch information
ltangvald committed Mar 17, 2016
1 parent 1293f37 commit 09f9177
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions packaging/deb-jessie/extra/mysql-systemd-start
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ sanity () {
chmod 750 ${MYSQLKEYRING}
fi

if [ ! -d "${MYSQLDATA}/mysql" -a ! -L "${MYSQLDATA}/mysql" ];
then
mkdir ${MYSQLDATA}/mysql
chown mysql:mysql ${MYSQLDATA}/mysql
chmod 750 ${MYSQLDATA}/mysql
fi

if [ ! "$(ls -A ${MYSQLDATA}/mysql)" ];
then
su - mysql -s /bin/bash -c "/usr/sbin/mysqld --initialize-insecure=on 2>&1 > /dev/null"
Expand Down
7 changes: 0 additions & 7 deletions packaging/deb-wily/extra/mysql-systemd-start
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ sanity () {
chmod 750 ${MYSQLKEYRING}
fi

if [ ! -d "${MYSQLDATA}/mysql" -a ! -L "${MYSQLDATA}/mysql" ];
then
mkdir ${MYSQLDATA}/mysql
chown mysql:mysql ${MYSQLDATA}/mysql
chmod 750 ${MYSQLDATA}/mysql
fi

if [ ! "$(ls -A ${MYSQLDATA}/mysql)" ];
then
su - mysql -s /bin/bash -c "/usr/sbin/mysqld --initialize-insecure=on 2>&1 > /dev/null"
Expand Down

0 comments on commit 09f9177

Please sign in to comment.