Skip to content

Commit 22186b5

Browse files
committed
Add .my.cnf generation back again
1 parent a651238 commit 22186b5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

install/hst-install-debian.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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

install/hst-install-ubuntu.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)