Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)

Error:

Could not connect to the database to read the site configuration.