Open J-ogawa opened 7 years ago
Mysql2::Clientの場合はhost,port指定の代わりにsocket指定
Mysql2::Client
host
port
socket
def db Thread.current[:isu4_db] ||= Mysql2::Client.new( socket: ENV['ISU4_DB_SOCKET'] || '/tmp/mysql.sock', username: ENV['ISU4_DB_USER'] || 'root', password: ENV['ISU4_DB_PASSWORD'], database: ENV['ISU4_DB_NAME'] || 'isu4_qualifier', reconnect: true, ) end
Mysql2::Client
の場合はhost
,port
指定の代わりにsocket
指定