Files
WMU-CS4430-Project/scripts/mysql_setup.sh

8 lines
420 B
Bash

#!/bin/bash
# Perform the equivalent of running `mysql_secure_installation`
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 "DELETE FROM mysql.db WHERE Db='test' OR Db='test_%';"
mysql -e "FLUSH PRIVILEGES;"