0

I can't connect mysql to rails ,i have tried to modify database.yml and gemfile but nothing works.Please help.

Rails Environment Configuration

git:
  version:    git version 1.7.6.msysgit.0

ruby:
  bin:        C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe
  version:    ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

rails:
  bin:        C:/RailsInstaller/Ruby1.9.2/bin/rails.bat
  version:    Rails 3.1.1

Process

C:\Sites>cd demo

C:\Sites\demo>rake db:migration
rake aborted!
Incorrect MySQL client library version! This gem was compiled for 6.0.0 but the
client library is 5.0.27.

(See full trace by running task with --tracing)

i have installed mysql 5.5

Dave Newton
  • 158,873
  • 26
  • 254
  • 302
mario
  • 1
  • 1
  • 3

2 Answers2

0

The problem lies with the Client Library which is libmysql.dll.

Try downloading version 6 from here:

http://dev.mysql.com/downloads/connector/c/

And change your current file with the new one.

tommasop
  • 18,495
  • 2
  • 40
  • 51
0
database yml

development:
  adapter: mysql2
  database: railsapp
  encoding: utf8
  username: root
  password: 1234
  pool: 5
  timeout: 5000

test:
  adapter: mysql2
   database: railsapp
   encoding: utf8
   username: root
  password: 1234
  pool: 5
  timeout: 5000

production:
   adapter: mysql2
    database: railsapp
    encoding: utf8
    username: root
  password: 1234
  pool: 5
  timeout: 5000
random
  • 9,774
  • 10
  • 66
  • 83
mario
  • 1
  • 1
  • 3