Rails3.1在windows连接Mysql的问题
程序员文章站
2022-07-14 21:22:54
...
When run rails server,get the error(already install newest RailsInstaller of windows xp and mysql2-0.3.11-x86-mingw32) :
There is a easy way to let RailsInstaller(Ruby1.9.2) use mysql-connector-c-6.
(1)download mysql-connector-c-noinstall-6.0.2-win32.zip
(2)Unzip the mysql-connector-c-noinstall-6.0.2-win32.zip and copu mysql-connector-c-noinstall-6.0.2-win32\lib\libmysql.dll to RailsInstaller\Ruby1.9.2\bin
Then run rails server,every thing is ok.
d:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/l ib/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.0.16. (RuntimeError) ......
There is a easy way to let RailsInstaller(Ruby1.9.2) use mysql-connector-c-6.
(1)download mysql-connector-c-noinstall-6.0.2-win32.zip
(2)Unzip the mysql-connector-c-noinstall-6.0.2-win32.zip and copu mysql-connector-c-noinstall-6.0.2-win32\lib\libmysql.dll to RailsInstaller\Ruby1.9.2\bin
Then run rails server,every thing is ok.
推荐阅读
-
WinXP连接WiFi提示Windows找不到证书问题的解决方法
-
一键搞定python连接mysql驱动有关问题(windows版本)
-
在ASP中连接MySQL数据库,最好的通过ODBC方法
-
Win10安装mysql8.0.15 winx64及连接服务器过程中遇到的问题
-
使用spoon(verison 6)2建立MySQL的连接遇到的问题
-
MySql连接空闲8小时自动断开引起的问题
-
在mysql中使用模糊查询时,使用中文查询结果不正确问题的解决办法
-
在Windows7中的DPI与主题的问题
-
mysql-8.0.13在windows上的部署
-
解决在Linux操作系统下无法连接MySQL服务端的问题