MySQL Forums
Forum List  »  Install & Repo

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.lock' (2 "No such file or directory")
Posted by: Ruud van Dijk
Date: May 10, 2019 05:33AM

Hi all,

I have a CentOS 7 installation with MariaDB but it was instable so I upgraded to MariaDB v10.

After the reinstall of MariaDB I can't connect with the mysql server using localhost, only 127.0.0.1 is working.

I get the error:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.lock' (2 "No such file or directory")

I checked the /var/lib/mysql directory and there is no mysql.lock.
Permisions on the folder are on user mysql and group mysql.
Why is localhost not working as hostname for connection?

Options: ReplyQuote


Subject
Written By
Posted
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.lock' (2 "No such file or directory")
May 10, 2019 05:33AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.