`
nnnnon
  • 浏览: 147695 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Mysql::Error: Lost connection to MySQL server during query:

    博客分类:
  • RORs
阅读更多
解决这个问题的步骤是:
1.下载 mysql/ruby 2.7.1


2解压其中的mysql.so到%RUBYARCHDIR%目录下(例如:C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt)

3.MySQL/Ruby needs a DLL dependency satisfied in order to run. You can do this by either:

    ------(Recommended) Including the MySQL bindir in your path (e.g. C:\Program Files\MySQL\MySQL Server 5.0\bin).


    ------Copying libmysql.dll from your MySQL bindir or source package to your Ruby bindir (e.g. C:\ruby\bin).


引用
Instant Rails users: You will find that the libmysql.dll from the included PHP distribution won’t work. Instead, grab a libmysql.dll from a real MySQL distribution. InstantRails 1.3a comes with MySQL 4.1.9, which you can download here



4.To verify, try to run the following code:

require 'mysql'
puts Mysql::VERSION


If it outputs 20700, then you’re all set up
分享到:
评论
2 楼 nnnnon 2006-09-26  
引用
用gem装一下mysql驱动也是一样的


请cookoo兄具体说说呢?
1 楼 cookoo 2006-09-25  
用gem装一下mysql驱动也是一样的

相关推荐

Global site tag (gtag.js) - Google Analytics