ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
Rails 5.0.0.1
Server version: 5.7.13-0ubuntu0.16.04.2 (Ubuntu)
database.yml
default: &default
adapter: mysql2
encoding: utf8
pool: 5
username: ****
password: ****
socket: /var/run/mysqld/mysqld.sock
When I open the page with entities it works good, but when I am trying to add new record the error appeares:
Puma caught this error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (Mysql2::Error)
/home/ruby/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mysql2-0.4.4/lib/mysql2/client.rb:87:in connect
/home/ruby/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mysql2-0.4.4/lib/mysql2/client.rb:87:in initialize
After I put rails server command it works again until I try to add new record. How could I fix this bug?