Mahara: Site unavailable

Mahara could not connect to the application database.

* If you are using Mahara, please wait a minute and try again
* If you are the administrator, please check your database settings and make sure your database is available

The error received was:
mysql error: [2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)] in CONNECT(localhost, 'elearn', '****', mahara)