ruby on rails - `connect': Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (Mysql2::Error) -


when tried run rails s on remote server got issue.

mysql working fine "rails db"

find socket file using

mysqladmin variables | grep socket 

and add socket file database.yml configuration

development:   adapter: mysql2   host: localhost   username: root   password: xxxx   database: xxxx   socket: <socket location> 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -