Can’t connect to local MySQL server through socket /tmp/mysql.sock

Failed to connect to database: Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2). . An error occurred. Please contact administrator..


Can’t connect to local MySQL server through socket ’3306 ’ in ezsh.log 

 
Edit the file "/usr/local/etc/ezlogin/ez.conf" and correct the variable

db_port <path to the mysql socket file found using the command below>

mysql -e "show variables like 'socket';"

Usually it would be /var/lib/mysql/mysql.sock but varies from server to server.

The command above would show the path to the mysql socket file that is current in use, else you would need to setup them in the mysql configuration file usually found in /etc/my.cnf.

You would need to make sure that the mysql sock does exist in the path specified in /usr/local/etc/ezlogin/ez.conf

0 (0)
Article Rating (No Votes)
Rate this article
    Attached Files
    There are no attachments for this article.
    Related Articles RSS Feed
    "An error occurred. Please contact administrator." - got error while trying to access remote server from jump server
    Viewed 1821 times since Tue, May 8, 2018
    Getting "Could not load configuration" or 500 error on login page
    Viewed 3245 times since Wed, Jun 14, 2017
    PHP Fatal error: The file /usr/local/sbin/backup_ezlogin.php was encoded by the ionCube Encoder for PHP. Ioncube Encoder Error during Ezeelogin upgrade
    Viewed 1241 times since Tue, Jul 24, 2018
    getting config from other node failed
    Viewed 727 times since Wed, Jan 9, 2019
    ERROR for site owner: Invalid domain for site key
    Viewed 5874 times since Thu, Jun 28, 2018
    reCaptcha images not loading
    Viewed 3243 times since Wed, Jun 14, 2017
    "Blank page" error in webssh console
    Viewed 1673 times since Tue, Jan 30, 2018
    License mismatch! This Ezeelogin was installed with a different license.
    Viewed 126 times since Thu, Jul 16, 2020
    internal command ezinfo not displaying server details
    Viewed 3073 times since Wed, Jun 14, 2017
    Configure Automatic su or sudo
    Viewed 4856 times since Thu, Jun 15, 2017