7 lines
342 B
Bash
7 lines
342 B
Bash
#!/bin/bash
|
|
service mysql start
|
|
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;" |