What\'s the use of socket declaration in config/database.yml ?
Example code:
staging:
adapter: mysql
encoding: utf8
database: (database)
pool
This displays the file location for the UNIX socket:
mysqladmin version -u 'your user name' -p
result:
mysqladmin Ver 8.42 Distrib 5.7.26, for Linux on x86_64
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Server version 5.7.26-0ubuntu0.19.04.1
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: 6 min 40 sec
Your user must have granted permissions.