Having an empty default for 'database' works for me and allows a user with only USAGE privs on *.* to connect.
The attached patch does just that. Cheers, Til
=== mytop ================================================================== --- mytop (revision 2) +++ mytop (local) @@ -75,7 +75,7 @@ my %config = ( batchmode => 0, color => 1, - db => 'test', + db => '', delay => 5, filter_user => qr/.?/, filter_db => qr/.?/, @@ -237,7 +237,7 @@ my $Error = <<EODIE Cannot connect to MySQL server. Please check the: - * database you specified "$config{db}" (default is "test") + * database you specified "$config{db}" (default is "") * username you specified "$config{user}" (default is "root") * password you specified "$config{pass}" (default is "") * hostname you specified "$config{host}" (default is "localhost") @@ -1701,7 +1701,7 @@ =item B<-d> or B<--db> or B<--database> I<database> Use if you'd like B<mytop> to connect to a specific database by -default. Default: ``B<test>''. +default. Default: none. =item B<-b> or B<--batch> or B<--batchmode>
signature.asc
Description: This is a digitally signed message part