MySQL Installation: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' Tried to install MySQL on Ubuntu, with these 3 commands:
sudo apt update
sudo apt install mysql-server
mysql_secure_installation

When running the last command, it asks for the password for the root account. After I enter it, I got the following error:
Securing the MySQL server deployment.

Enter password for user root:
Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I have checked and apparently there is no mysqld.sock file anywhere.
Is there anything else I should run that I haven't yet?
I know there are a lot of descriptions about this error on the internet, but there seems to be many causes for that, and all of them seems linked to installation.
In my case, I found out my &quot;sudo&quot; access had some issues. After I've corrected them, I've uninstalled everything and installed again, and everything seems to work fine now.