Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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!"
Add Comment
Please, Sign In to add comment