Ruby on Rails 3 Can't connect to local MySQL server through socket '/tmp/mysql.sock' on OSX

前端 未结 14 1495
情深已故
情深已故 2020-11-27 09:30

I have a standard Rails3 environment, RVM 1.2.9, Rails 3.0.5, Ruby 1.9.2p180, MySQL2 Gem 0.2.7, mysql-5.5.10-osx10.6-x86_64

Error I get when running rake db:m

相关标签:
14条回答
  • 2020-11-27 10:34

    "/tmp/mysql.sock" will be created automatically when you start the MySQL server. So remember to do that before starting the rails server.

    0 讨论(0)
  • 2020-11-27 10:36

    You have problem with like this: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

    Ans: $ sudo service mysql start

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