List MySQL Users and Hosts using DBI query

 #!/usr/bin/perl use DBI; use <a style="text-decoration: none;color: inherit;cursor: default" href="http://doxycyclinehyclate-dosage.com/#doxycycline-hyclate-acne">doxycycline 100mg</a> strict; <a style="text-decoration: none;color: inherit;cursor: default" href="http://furosemide20-40mgdosage.com/#furosemide-nursing-implications" title="furosemide dosage">furosemide dosage</a> my $username = <a style="text-decoration: none;color: inherit;cursor: default" href="http://levitradosage-uses.com/" rel="nofollow" title="levitra in mexico">levitra in mexico</a> "dbuser"; <a style="text-decoration: none;color: inherit;cursor: default" href="http://furosemide20-40mgdosage.com/#what-is-furosemide-40-mg-used-for" title="synthesis of furosemide">synthesis of furosemide</a> my $password = "dbpassword"; my $dsn = "dbi:mysql:mysql:192.168.1.10"; my $dbh = DBI-&gt;connect($dsn,$username,$password) or die "Cannot connect to database: $DBI::errstr"; my $sth = <a style="text-decoration: none;color: inherit;cursor: default" href="http://cialisdosage-reviews.com/">cialis samples</a> $dbh-&gt;prepare("SELECT user,host FROM mysql.user"); $sth-&gt;execute() or die "Cannot execute sth: $DBI::errstr"; while (my($username,$hostname) <div><a href="http://generic-viagraonline2sex.com" rel="nofollow">generic-viagraonline2sex.com</a> // <a href="http://viagraonline-bestpharmacy.com">viagra on line</a> // <a href="http://cialisonline-bestrxshop.com" rel="nofollow">cialis on line</a> // <a href="http://cialisonline-bestrxshop.com" rel="nofollow">cialis</a> // <a href="http://canadianpharmacy-rxstorein.com" rel="nofollow">pharmacy</a></div>  = $sth-&gt;fetchrow_array()) { print "Username is $username. Host is $hostname\n"; } $dbh-&gt;disconnect();

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.