Database error

Could not connect to "localhost", (port 3306).

MySQL says:

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)