Skip to content

Commit c224f0e

Browse files
committed
Fix some issues with mariadb.
1 parent 2c5f26d commit c224f0e

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

install/hst-install-ubuntu.sh

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,21 +1046,8 @@ if [ "$mysql" = 'yes' ]; then
10461046

10471047
# Configuring MariaDB
10481048
cp -f $hestiacp/mysql/$mycnf /etc/mysql/my.cnf
1049-
if [ "$release" = '14.04' ]; then
1050-
mysql_install_db > /dev/null 2>&1
1051-
fi
1052-
if [ "$release" = '16.04' ] || [ "$release" = '18.04' ]; then
1053-
if [ -e '/etc/init.d/mysql' ]; then
1054-
if [ -d '/var/lib/mysql' ]; then
1055-
rm -fr /var/lib/mysql
1056-
mkdir -p /var/lib/mysql
1057-
else
1058-
mkdir -p /var/lib/mysql
1059-
fi
1060-
chown mysql:mysql /var/lib/mysql
1061-
mysqld --initialize-insecure > /dev/null 2>&1
1062-
fi
1063-
fi
1049+
mysql_install_db > /dev/null 2>&1
1050+
10641051
update-rc.d mysql defaults
10651052
service mysql start
10661053
check_result $? "mariadb start failed"
@@ -1070,7 +1057,7 @@ if [ "$mysql" = 'yes' ]; then
10701057
mysqladmin -u root password $mpass > /dev/null 2>&1
10711058
echo -e "[client]\npassword='$mpass'\n" > /root/.my.cnf
10721059
chmod 600 /root/.my.cnf
1073-
if [ "$release" = '16.04' ]; then
1060+
if [ "$release" = '14.04' ] || [ "$release" = '16.04' ]; then
10741061
mysql -e "DELETE FROM mysql.user WHERE User=''"
10751062
mysql -e "DROP DATABASE test" > /dev/null 2>&1
10761063
mysql -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"

0 commit comments

Comments
 (0)