Fixes in install_mariadb
This commit is contained in:
parent
c56366923f
commit
eb7e913469
4 changed files with 116 additions and 10 deletions
25
scripts/servers/databases/mariadb/mysql_secure.sh
Normal file
25
scripts/servers/databases/mariadb/mysql_secure.sh
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
expect -f - <<-EOF
|
||||
set timeout 10
|
||||
spawn mysql_secure_installation
|
||||
expect "Enter current password for root (enter for none):"
|
||||
send -- "\r"
|
||||
expect "Switch to unix_socket authentication"
|
||||
send -- "n\r"
|
||||
expect "Set root password?"
|
||||
send -- "y\r"
|
||||
expect "New password:"
|
||||
send -- "${MYSQL_PASS}\r"
|
||||
expect "Re-enter new password:"
|
||||
send -- "${MYSQL_PASS}\r"
|
||||
expect "Remove anonymous users?"
|
||||
send -- "y\r"
|
||||
expect "Disallow root login remotely?"
|
||||
send -- "y\r"
|
||||
expect "Remove test database and access to it?"
|
||||
send -- "y\r"
|
||||
expect "Reload privilege tables now?"
|
||||
send -- "y\r"
|
||||
expect eof
|
||||
EOF
|
||||
Loading…
Add table
Add a link
Reference in a new issue