解决这个问题的步骤是:
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
分享到:
相关推荐
代码如下:Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0 很明显这是连接初始化阶段就丢失了连接的错误。 google半天大多是说的注释掉配置文件中 bind-address = ...
当通过 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)这样的连接错误,提示"Lost connection to MySQL server at 'waiting for initial communication packet', system error: 0"。这个错误通常意味着客户端在尝试与...
Mysql mysql lost connection to server during query 问题解决方法 缘由: 在查询Mysql中的数据库,或者修改比较大的表的时候就会出现这种情况; google之: 方案1.在mysql配置文件[myslqd]下面添加一行设置skip-...
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 ...