Skip to content

Commit

Permalink
List users without passwords as user@host, sorted.
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Dec 24, 2009
1 parent b2dfc87 commit 0bd59c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mysqltuner.pl
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,9 @@ sub get_all_vars {

sub security_recommendations {
print "\n-------- Security Recommendations -------------------------------------------\n";
my @mysqlstatlist = `mysql $mysqllogin -Bse "SELECT user FROM mysql.user WHERE password = '' OR password IS NULL;"`;
my @mysqlstatlist = `mysql $mysqllogin -Bse "SELECT CONCAT(user, '\@', host) FROM mysql.user WHERE password = '' OR password IS NULL;"`;
if (@mysqlstatlist) {
foreach my $line (@mysqlstatlist) {
foreach my $line (sort @mysqlstatlist) {
chomp($line);
badprint "User '".$line."' has no password set.\n";
}
Expand Down

0 comments on commit 0bd59c3

Please sign in to comment.