Created
August 26, 2011 12:09
-
-
Save dotmh/1173285 to your computer and use it in GitHub Desktop.
Simple Mysql2 gem install checker
This file contains 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 characters
require 'mysql2' | |
client = Mysql2::Client.new(:host => "127.0.0.1", :username => "root" , :password => "root") | |
results = client.query("show Databases;") | |
puts "found #{results.count} databases \n" | |
results.each do | row | | |
puts row["Database"] | |
end | |
puts "\n Script Finished!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment