Maybe this can help you, from GoDaddy help center:
Error Message:
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/content/u/s/e/username/html/file.php on line 2
Cause:
This is caused by your script trying to connect to 'localhost' as the MySQL server. The error displays the exact line that needs to be altered (in this case, it is on /file.php line 2).
Resolution:
To resolve this error, change your database connection string see more to use the correct server name. This can be found in the MySQL section of your hosting control panel.
Error Message:
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/content/u/s/e/username/html/file.php on line 2
Cause:
This is caused by your script trying to connect to 'localhost' as the MySQL server. The error displays the exact line that needs to be altered (in this case, it is on /file.php line 2).
Resolution:
To resolve this error, change your database connection string see more