Skip to content

Commit eab5c3c

Browse files
committed
Prevent error message on mysql initialize.
1 parent 5106d53 commit eab5c3c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

install/hst-install-ubuntu.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,12 @@ cp -r /etc/mysql/* $hst_backups/mysql > /dev/null 2>&1
540540
mv -f /root/.my.cnf $hst_backups/mysql > /dev/null 2>&1
541541
if [ "$release" = '16.04' ] || [ "$release" = '18.04' ]; then
542542
if [ -e '/etc/init.d/mysql' ]; then
543-
mkdir -p /var/lib/mysql > /dev/null 2>&1
543+
if [ -d '/var/lib/mysql' ]; then
544+
rm -fr /var/lib/mysql
545+
mkdir -p /var/lib/mysql
546+
else
547+
mkdir -p /var/lib/mysql
548+
fi
544549
chown mysql:mysql /var/lib/mysql
545550
mysqld --initialize-insecure
546551
fi

0 commit comments

Comments
 (0)