Another attempt
This commit is contained in:
5
scripts/mysql_secure_install_equivalent.sql
Normal file
5
scripts/mysql_secure_install_equivalent.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
UPDATE mysql.user SET authentication_string=PASSWORD('Password1234') WHERE User='root';
|
||||
DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
|
||||
DELETE FROM mysql.user WHERE User='';
|
||||
DELETE FROM mysql.db WHERE Db='test' OR Db='test_%';
|
||||
FLUSH PRIVILEGES;
|
||||
@@ -1,20 +1,2 @@
|
||||
#!/bin/bash
|
||||
mysql_secure_installation << EOF
|
||||
|
||||
y
|
||||
Password1234
|
||||
Password1234
|
||||
y
|
||||
y
|
||||
y
|
||||
y
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
|
||||
#UPDATE mysql.user SET authentication_string=PASSWORD('Password1234') WHERE User='root';
|
||||
#DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
|
||||
#DELETE FROM mysql.user WHERE User='';
|
||||
#DELETE FROM mysql.db WHERE Db='test' OR Db='test_%';
|
||||
#FLUSH PRIVILEGES;
|
||||
mysql -u root < /scripts/mysql_secure_install_equivalent.sql
|
||||
Reference in New Issue
Block a user