Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have just post a question but I post an other one because the problem is not the one I had in thought when asking the latter.

So, I am running some rails app on osx, when I run rails s, everything works fine. If I shut down the apache server (mamp) and if I run rails s again, I have this message

Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock',

which for sure is normal. For info, my mamp server is running, and the connection must pass through /Applications/MAMP/Library/bin/mysql, so I aliased it by setting in my bash profile :

alias mysql="/Applications/MAMP/Library/bin/mysql"

Now, when I launch a rails generate command type, I get this message :

/$root/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (Mysql2::Error)

So how it can be ?

share|improve this question
    
Is mysql really running? You say that you shut down apache/mamp, and then you say mamp is running. This is very confusing. –  Jenny D Jun 25 '13 at 7:28
    
@JennyD, yes mysql is running. In fact I shut down apache just for testing, to catch the socket rails s command would try to fetch in its process –  Newben Jun 25 '13 at 7:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.