摘要: Ruby使用DBI连接MySQL数据库一般为:require "dbi"dbh = DBI.connect("dbi:Mysql:test:localhost", "root", "123456")dbh.disconnect if dbh 但是当mysql数据库端口改变时,如果直接在“dbi:Mysql:test:localhost”后面加上端口号,如“dbi:Mysql:test:localhost:10086”,将出现错误代码为2003的异常:C:/Ruby193/lib/ruby/gems/1.9.1/ge 阅读全文
posted @ 2014-03-09 18:36 丶小青豆丶 阅读(575) 评论(0) 推荐(0) 编辑