From 4891d8cf7c26f9b4f3f463941c81507a2e07c587 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 22 Nov 2019 23:53:20 -0500 Subject: [PATCH] 100th time's the charm? --- scripts/mysql_setup.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/scripts/mysql_setup.sh b/scripts/mysql_setup.sh index 9649896..d12a452 100644 --- a/scripts/mysql_setup.sh +++ b/scripts/mysql_setup.sh @@ -1,12 +1,7 @@ #!/bin/bash service mysql start -mysql_secure_installation << EOF - -y -Password1234 -Password1234 -y -y -y -y -EOF \ No newline at end of file +mysql -e "UPDATE mysql.user SET authentication_string=PASSWORD('Password1234') WHERE User='root';" +mysql -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" +mysql -e "DELETE FROM mysql.user WHERE User='';" +mysql -e "DROP DATABASE test;" +mysql -e "FLUSH PRIVILEGES;" \ No newline at end of file