Softaculous


Topic : Can't connect to local MySQL server through socket


Posted By: Papershosting on November 29, 2021, 6:16 am
Hello, today I visited my virtualizor site and got a lovely message
Code
Error!: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/usr/local/emps/var/mysql/mysql.sock' (2)

What troubleshooting steps should i take to resolve this issue?

Posted By: wolke on November 29, 2021, 7:42 am | Post: 1
check if mysql is running at all:

Code
systemctl status mysql


if mysql is running, check your my.cnf config file if you have the following line in the [mysqld] section:

socket=/var/lib/mysql/mysql.sock

If not, add this line and restart mysql

Edited by wolke : November 29, 2021, 7:42 am

Posted By: jevingala on November 29, 2021, 1:11 pm | Post: 2
Hi,


You can also try using this guide :


https://www.virtualizor.com/docs/faq/panel-is-offline/

-----------------------
Regards,
Virtualizor Team.
http://virtualizor.com/

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.