File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1518,6 +1518,9 @@ if [ "$mysql" = 'yes' ]; then
15181518 systemctl start mysql >> $LOG
15191519 check_result $? " mariadb start failed"
15201520
1521+ echo -e " [client]\npassword='$mpass '\n" > /root/.my.cnf
1522+ chmod 600 /root/.my.cnf
1523+
15211524 # Ater root password
15221525 mysql -e " ALTER USER 'root'@'localhost' IDENTIFIED BY '$mpass '; FLUSH PRIVILEGES;"
15231526 # Remove root login from remote servers
Original file line number Diff line number Diff line change @@ -1540,7 +1540,6 @@ if [ "$mysql" = 'yes' ]; then
15401540
15411541 # Securing MariaDB installation
15421542 mpass=$( gen_pass)
1543- mysqladmin -u root password $mpass >> $LOG
15441543 echo -e " [client]\npassword='$mpass '\n" > /root/.my.cnf
15451544 chmod 600 /root/.my.cnf
15461545
You can’t perform that action at this time.
0 commit comments