`
nnnnon
  • 浏览: 151067 次
  • 性别: 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驱动也是一样的

相关推荐

    MySQL远程连接丢失问题解决方法(Lost connection to MySQL server)

    代码如下:Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0 很明显这是连接初始化阶段就丢失了连接的错误。 google半天大多是说的注释掉配置文件中 bind-address = ...

    MySQL ERROR 2013 (HY000)错误解决方法

    当通过 TCP/IP 连接 MySQL 远程主机时,出现 ERROR 2013 (HY000): Lost connection to MySQL server at ... 命令时就随机出现 ERROR 2013 (HY000): Lost connection to MySQL server during query 问题。而如果把

    MySQL出现SQL Error (2013)连接错误的解决方法

    在使用MySQL数据库时,有时会遇到SQL Error (2013)这样的连接错误,提示"Lost connection to MySQL server at 'waiting for initial communication packet', system error: 0"。这个错误通常意味着客户端在尝试与...

    mysql不能启动报error2013错误的多种解决方案

    Mysql mysql lost connection to server during query 问题解决方法 缘由: 在查询Mysql中的数据库,或者修改比较大的表的时候就会出现这种情况; google之: 方案1.在mysql配置文件[myslqd]下面添加一行设置skip-...

    Delphi7.1 Update

    When using a TimeStamp type parameter with a TClientDataSet an error occurs when the parameter is passed to the server (Quality Central 6372). * Setting MTSDataModule.AutoComplete to False in the IDE ...

Global site tag (gtag.js) - Google Analytics