Error when trying to create database with Rails, rake db:create

后端 未结 5 1412
长情又很酷
长情又很酷 2020-12-25 15:28

I\'m using Ruby1.9 and Rails 2.3.4 and I have mysql-ruby (2.8.1) gem installed.

when I try rake db:create I get the following

Couldn\'t create

5条回答
  •  借酒劲吻你
    2020-12-25 16:07

    Strange to see some behaviour changed, and I don't know if it is specific to snow leopard. I use tiger and got the same error. I added

      host: 127.0.0.1
    

    to the following (ofcourse with a correct mysql root/pw)

    development:
      adapter: mysql
      encoding: utf8
      reconnect: false
      database: blog_development
      pool: 5
      username: root
      password: *********
      socket: /tmp/mysqld.sock
    

    And it worked (on tiger/gem mysql-2.8.1/mysql Ver 14.14 Distrib 5.1.30). Hope it helps.

提交回复
热议问题