<!-- lang: ruby -->
require "mysql"
conn = Mysql.real_connect("localhost", "root", "112358", "test")
rs = conn.query("show databases")
while row = rs.fetch_row do
puts row
end
转载于:https://my.oschina.net/zhuf/blog/85166
<!-- lang: ruby -->
require "mysql"
conn = Mysql.real_connect("localhost", "root", "112358", "test")
rs = conn.query("show databases")
while row = rs.fetch_row do
puts row
end
转载于:https://my.oschina.net/zhuf/blog/85166