MySQL driver for Rails in Windows 7 x64

前端 未结 10 1638
长发绾君心
长发绾君心 2020-12-23 14:46

I\'ve got problem with connecting to MySQL database on my freshly installed Windows 7 machine. I\'m getting this error when I try to migrate my database.

!!!         


        
相关标签:
10条回答
  • 2020-12-23 15:26

    Another option which has worked for me is to download the 32bit version of mysql for windows and just keep the libmysql.dll and add the location of this DLL to the windows PATH.

    0 讨论(0)
  • 2020-12-23 15:28

    Fast forward to March 2012. I solved this problem on windows 7 x64) by renaming my Ruby\b\bin\libmysql.dll and then copying libmysql.dll from C:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\lib\opt to Ruby\bin

    There was a newer version of libmysql.dll at C:\Program Files (x86)\MySQL\MySQL Workbench CE 5.2.37 but the gem didn't like the non 6.x version.

    0 讨论(0)
  • 2020-12-23 15:28

    Could this be related to Ruby on Rails Win7 x64? ? If so, what was the fix again (couldn't figure it out from the first answer) ?

    0 讨论(0)
  • 2020-12-23 15:35

    The solution to this problem is to simply install the 32-bit version of mysql.

    0 讨论(0)
  • 2020-12-23 15:37

    I spent hours trying to get MySQL and Rails to play nicely on Windows (albeit XP, both 32 and 64-bit versions). I finally gave up since my production box was running Linux (on which Rails and MySQL play very nicely) and just used SQLite 3 for development. No headaches to get it working and it runs fast enough for development purposes.

    However, I did hear of some people that had luck replacing one of the DLLs provided by the gem with one provided by the official MySQL distribution. Also, some people simply didn't have this DLL at all which was causing problems. In the end, it didn't work for me, but hopefully you will have more luck.

    0 讨论(0)
  • 2020-12-23 15:37

    I'm running the current versions of everything on WinXP SP3: Ruby 1.9.2p0, MySQL 5.5, mysql 2.8.1. This issue is still present and to fix it I had to copy the Instant Rails libmysql.dll into my C:\Ruby192\bin directory. I initially copied the libmysql.dll file that came with MySQL 5.5 but that caused a seq fault!

    0 讨论(0)
提交回复
热议问题