w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
`connect': Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (Mysql2::Error)

Find your socket file using

mysqladmin variables | grep socket

And then add the socket file to your database.yml configuration

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




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.