Created
December 23, 2014 15:01
Revisions
-
vdvm revised this gist
Dec 23, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,8 +24,8 @@ DROP DATABASE test; DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%' ``` Reload privilege tables: ``` FLUSH PRIVILEGES; ``` -
vdvm created this gist
Dec 23, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ Set root password: ``` UPDATE mysql.user SET Password=PASSWORD('mysecret') WHERE User='root'; FLUSH PRIVILEGES; ``` Remove anonymous users: ``` DELETE FROM mysql.user WHERE User=''; ``` Disallow root login remotely: ``` DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1'); ``` Remove test database and access to it: ``` DROP DATABASE test; DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%' ``` ``` Reload privilege tables: ``` FLUSH PRIVILEGES;