Rake displays Can't connect local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'

i have a small problem every time i run “rake db:migrate” it shows me
an error

Can’t connect local MySQL server through socket ‘/var/run/mysqld/
mysqld.sock’ (2)’

can somebody help me?

hi

its possible that either the socket is already in use or the the path
for the socket is false…

these r the only 2 possiblities i guess

thanks

Dhaval P.
Software Engineer

sales(AT)railshouse(DOT)com

Thanks for replying,

What you said is actually very usefull because i didn’t know why this
could be happening,
can you give me any tip of how i could solve the problem?

On Jun 14, 3:43 am, Dhaval P. [email protected]

On Jun 15, 8:27 am, RoR_Nb [email protected] wrote:

Do you have any idea how i can start soliving this problem?

On Jun 13, 1:26 pm, RoR_Nb [email protected] wrote:

i have a small problem every time i run “rake db:migrate” it shows me
an error

Can’t connect local MySQL server through socket ‘/var/run/mysqld/
mysqld.sock’ (2)’

Assuming that mysql is actually installed and running,

check that what you’ve got in database.yml (in the socket parameter)
matches what’s in /etc/my.cnf
If database.yml doesn’t specify the socket then it’s probably falling
back on some default, so set it to whatever is in my.cnf

Fred

Do you have any idea how i can start soliving this problem?

Awesome, thanks
it’s working now,
I specified the socket and it’s working fine

On Jun 15, 2:56 am, Frederick C. [email protected]