I am getting the following error when I try to connect to mysql:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Is there a solution for this error? What might be the reason behind it?
I am getting the following error when I try to connect to mysql:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Is there a solution for this error? What might be the reason behind it?
Ensure that your mysql service is running
Then, try the one of the following following:
(if you have not set password for mysql)
if you have set password already
if you change files in /var/lib/mysql [ like copy or replace that ], you must set owner of files to mysql this is so important if mariadb.service restart has been faild
This might be a stupid suggestion but make 100% sure your DB is still hosted at localhost. For example, if a Network Admin chose (or changed to) Amazon DB hosting, you will need that hostname instead!
ran into this issue while trying to connect mysql in SSH client, found adding the socket path to the command helpful when switching between sockets is necessary.
One way to reproduce this error: If you meant to connect to a foreign server but instead connect to the non existent local one:
So you have to specify the host like this:
If you are in the shell of sf.net, try:
Change {LETTER} and {GROUP ID} as shown in your MySQL Database of project admin profile.