mysql - 最新版本的 mysql2 和 mysql gems 需要 mysql 6.0。如何在 5.x 中使用它?

标签 mysql ruby windows

我已经全新安装了 Ruby+Gems+DevKit+Rails。我已经安装了mysql和mysql2。当我尝试启动开发服务器时出现错误:

C:/Ruby/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in `require': Incorrect MySQL client library version! This gem was compiled for 6.0.0 but the client library is 5.6.10. (RuntimeError)

如何使用 5.6.10 版本的 MySQL?
我在 Windows 平台上运行它。

最佳答案

mysql2和mysql gems之间的区别与mysql服务器版本无关。

mysql2 是 mysql gem 的重写,它被设计为一组更现代的 libmysql 绑定(bind):正确支持 ruby​​ 1.9 编码、更好(且更快)的类型转换等等。

关于mysql - 最新版本的 mysql2 和 mysql gems 需要 mysql 6.0。如何在 5.x 中使用它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16647912/

相关文章:

mysql - 选择等于和不等于的地方

drupal - drupal View 中的自定义查询 - 现在无法排序

ruby-on-rails - Ruby on Rails 3 - 使用 View 和 Controller 创建插件或引擎?

ruby - Rspec `eq` 与 `eql` 测试中的 `expect`

ruby-on-rails - 使用多个条件对列表进行排序 Ruby on Rails

mysql - 我可以有两行内容相同(除了 1 列)吗

php - 使用 Propel 获取最后 5 项 sql 结果

windows - `gitk` 使用`where`命令找到程序但无法执行?

windows - 仅当鼠标悬停时滚动

windows - 如何修复 ‘--go_out: protoc-gen-go: The system cannot find the file specified.’ 错误