Welcome Guest. Please Login or Register  


You are here: Index > Virtualizor - Virtual Server Control Panel > General Support > Topic : Can't connect to local MySQL server through socket



Threaded Mode | Print  

 Can't connect to local MySQL server through socket (2 Replies, Read 19339 times)
Papershosting
Group: Member
Post Group: Newbie
Posts: 1
Status:
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?
IP: --   

Can't connect to local MySQL server through socket
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
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
IP: --   

Can't connect to local MySQL server through socket
jevingala
Group: Virtualizor Team
Post Group: Super Member
Posts: 739
Status:
Hi,


You can also try using this guide :


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

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

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is March 28, 2024, 10:02 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.043