I've managed to clear up most of the error messages by going through the various conf files and changing 127.0.0.1 to localhost wherever a MySQL connection is used which is a bit of a kludge as if I ever update any of the software I'll have to do that again but I still have problems with software trying to connect to MySQL on 127.0.0.1 and it failing.
I turned off iptables to see if it was a rule stopping this from working but that didn't sort it.
GRANT ALL PRIVILEGES ON *.*
IDENTIFIED BY '<my_password>'
WITH GRANT OPTION;
to see if resetting the privileges would help but it didn't
Whenever anything tries to connect to MySQL on 127.0.0.1 I get:
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
It's really frustrating as I know even if I find every reference on my entire system to 127.0.0.1 and change it to localhost all I have to do is update a package that rewrites a conf somewhere and I'm back to this state.