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
    setup web ssh console in ezeelogin and ssh via browser
    Viewed 13706 times since Tue, Jan 30, 2018
    User add failed
    Viewed 6309 times since Wed, Jun 14, 2017
    How do i disable google 2 factor authentication or other 2factor mechanisms in the GUI?
    Viewed 6414 times since Wed, Jun 14, 2017
    Primary node showing the public ip instead of lan ip when cluster is configured
    Viewed 1080 times since Wed, Nov 21, 2018
    unable to start mysql in ubuntu 14 " logger command not found"
    Viewed 3427 times since Thu, Jun 15, 2017
    vzctl enter veid fails. Unable to get term attr: Invalid argument
    Viewed 3114 times since Wed, Jun 14, 2017
    Unable to access Control Panel Error: Error occurred while communicating with the server
    Viewed 3104 times since Thu, Jun 15, 2017
    Backup Ezeelogin failed during Ezeelogin version upgrade
    Viewed 522 times since Tue, Jul 28, 2020
    How to disable web terminal appllication in Cpanel ?
    Viewed 3701 times since Fri, Jun 29, 2018
    Unable to add server into Ezeelogin via webinterface. Password error, times out
    Viewed 2530 times since Wed, Jun 14, 2017