ahmet
ahmet

Reputation: 5005

MySQL server is running but getting "Can't Connect"

bundle exec rake db:migrate
(in /home/ahmet/x)

rake aborted!
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

(See full trace by running task with --trace)

Is this a file permission error?

Upvotes: 0

Views: 1835

Answers (1)

Dnyan Waychal
Dnyan Waychal

Reputation: 1418

If there is not currently a section called [client], try to add this lines at the end

[client]
socket=/var/lib/mysql/mysql.sock

Upvotes: 1

Related Questions