ruby 连接mysql 2015/03/11 34607 清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>> require "mysql" dbc = Mysql.real_connect('127.0.0.1','root','123','test') res = dbc.query('select * from users') while row = res.fetch_row do puts "#{row[0]},#{row[1]}" end 这个是ruby 用mysqlianjie数据库