I have this error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")

Anyone know what is wrong? It seems it isn't installing mysqld.sock, when I run apt-get install mysql-server. I tried find / -name "mysqld.sock" but it can't find anything. How can I get mysqld.sock?

In errror.log I've got this error.

2018-08-13 10:43:09 139999537754688 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 98: Address already in $2018-08-13 10:43:09 139999537754688 [ERROR] Do you already have another mysqld server running on port: 3306 ? 2018-08-13 10:43:09 139999537754688 [ERROR] Aborting

1 Answer 1


After installation is completed, please run mysql_secure_installation command. This will ask you to set mysql root password and other security related options, including removing remote access to the root user and setting the root password.

Try the below commands,

 systemctl start mysql
 systemctl enable mysql

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .