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

前端 未结 14 1648
情深已故
情深已故 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:14

    On my machine mysqld service stopped that's why it was giving me the same problem.

    1:- Go to terminal and type

    sudo service mysqld restart
    

    This will restart the mysqld service and create a new sock file on the required location.

提交回复
热议问题