简体   繁体   English

Ruby Gem for windows中的mysql 5.5

[英]Ruby Gem for mysql 5.5 in windows

We are going to use mysql 5.5 in our application for production. 我们将在我们的应用程序中使用mysql 5.5进行生产。 I did some online search and it seems that mysql2 0.2.6 is the one for mysql5.5. 我做了一些在线搜索,似乎mysql2 0.2.6是mysql5.5的一个。 Is this gem good for windows as well? 这个宝石对Windows也有好处吗? Any tips on how to install and manage for production? 有关如何安装和管理生产的任何提示?

Thanks. 谢谢。

The gems (either mysql or mysql2) provides an version-independent layer to the version of MySQL you are running. gem(mysql或mysql2)为您运行的MySQL版本提供与版本无关的层。

However, if you're using a pre-compiled gem, it will require a version specific MySQL library be installed in your system. 但是,如果您使用的是预编译的gem,则需要在系统中安装特定于版本的MySQL库。

To avoid that, you can use MySQL Connector/C which provides a version-independent way to connect to MySQL. 为避免这种情况,您可以使用MySQL Connector / C,它提供与版本无关的方式来连接MySQL。

I've documented how to compile mysql gem against MySQL Connector/C in this blog post: 我已在此博客文章中记录了如何针对MySQL Connector / C编译mysql gem:

http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/ http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/

mysql2 gem has some issues on Windows so I would recommend you use mysql gem for the time being. mysql2 gem在Windows上有一些问题所以我建议你暂时使用mysql gem。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM