# gem install mysql
require 'mysql' #my = Mysql.new(hostname, username, password, databasename) con = Mysql.new('localhost', 'testuser', 'testpass', 'testdb')
rs = con.query('select * from testtable')
rs.each_hash {|h| puts h['column_name']}
con.close