$gem install mysql => failed, so $gem install ruby-mysql => success!
require 'mysql' hostname = 'xxx' username = 'xxx' password = 'xxx' db_name = 'xxx' my = Mysql.connect(hostname, username, password, db_name) my.query("SELECT * FROM USER LIMIT 10").each do |col1, col2| p col1, col2 end #=>connect & select success!