Просмотр исходного кода

Add .my.cnf generation back again

Jaap Marcus 4 лет назад
Родитель
Сommit
22186b59bf
2 измененных файлов с 3 добавлено и 1 удалено
  1. 3 0
      install/hst-install-debian.sh
  2. 0 1
      install/hst-install-ubuntu.sh

+ 3 - 0
install/hst-install-debian.sh

@@ -1518,6 +1518,9 @@ if [ "$mysql" = 'yes' ]; then
     systemctl start mysql >> $LOG
     check_result $? "mariadb start failed"
 
+    echo -e "[client]\npassword='$mpass'\n" > /root/.my.cnf
+    chmod 600 /root/.my.cnf
+    
     # Ater root password
     mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '$mpass'; FLUSH PRIVILEGES;"
     # Remove root login from remote servers 

+ 0 - 1
install/hst-install-ubuntu.sh

@@ -1540,7 +1540,6 @@ if [ "$mysql" = 'yes' ]; then
 
     # Securing MariaDB installation
     mpass=$(gen_pass)
-    mysqladmin -u root password $mpass >> $LOG
     echo -e "[client]\npassword='$mpass'\n" > /root/.my.cnf
     chmod 600 /root/.my.cnf