Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

List users without passwords as user@host, sorted.

  • Loading branch information...
commit e8495cea281534f8233d8e64f721f633f7e8efdb 1 parent b2dfc87
@scop scop authored committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 mysqltuner.pl
View
4 mysqltuner.pl
@@ -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";
}
Please sign in to comment.
Something went wrong with that request. Please try again.