Skip to content

Commit b23c3ae

Browse files
committed
Fix configuration issue for mysql on Ubuntu 18.04 and hide output of phpmyadmin fix.
1 parent 75e6647 commit b23c3ae

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

install/hst-install-debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ fi
13271327
# Special thanks to Pavel Galkin (https://skurudo.ru)
13281328
# https://github.com/skurudo/phpmyadmin-fixer
13291329

1330-
source $hestiacp/phpmyadmin/pma.sh
1330+
source $hestiacp/phpmyadmin/pma.sh > /dev/null 2>&1
13311331

13321332
#----------------------------------------------------------#
13331333
# Configure Admin User #

install/hst-install-ubuntu.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,11 +1068,21 @@ if [ "$mysql" = 'yes' ]; then
10681068
mysqladmin -u root password $mpass
10691069
echo -e "[client]\npassword='$mpass'\n" > /root/.my.cnf
10701070
chmod 600 /root/.my.cnf
1071-
mysql -e "DELETE FROM mysql.user WHERE User=''"
1072-
mysql -e "DROP DATABASE test" >/dev/null 2>&1
1073-
mysql -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
1074-
mysql -e "DELETE FROM mysql.user WHERE user='' OR password='';"
1075-
mysql -e "FLUSH PRIVILEGES"
1071+
if [ "$release" = '16.04' ]; then
1072+
mysql -e "DELETE FROM mysql.user WHERE User=''"
1073+
mysql -e "DROP DATABASE test" >/dev/null 2>&1
1074+
mysql -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
1075+
mysql -e "DELETE FROM mysql.user WHERE user='' OR password='';"
1076+
mysql -e "FLUSH PRIVILEGES"
1077+
fi
1078+
if [ "$release" = '18.04' ]; then
1079+
mysql -e "DELETE FROM mysql.user WHERE User=''"
1080+
mysql -e "DROP DATABASE test" >/dev/null 2>&1
1081+
mysql -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
1082+
mysql -e "DELETE FROM mysql.user WHERE user='';"
1083+
mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '$mpass';"
1084+
mysql -e "FLUSH PRIVILEGES"
1085+
fi
10761086

10771087
# Configuring phpMyAdmin
10781088
if [ "$apache" = 'yes' ]; then
@@ -1299,7 +1309,7 @@ fi
12991309
# Special thanks to Pavel Galkin (https://skurudo.ru)
13001310
# https://github.com/skurudo/phpmyadmin-fixer
13011311

1302-
source $hestiacp/phpmyadmin/pma.sh
1312+
source $hestiacp/phpmyadmin/pma.sh > /dev/null 2>&1
13031313

13041314

13051315
#----------------------------------------------------------#

0 commit comments

Comments
 (0)