I have been running a PHP script on a OSX Server which connects to an external MySQL server and displays some results, it has worked great for months until today..............

When it runs now, it displays an error saying access is denied to it's own domain name even though it is connecting to an external server.

I tried connecting from the Terminal using:
mysql -u root -p<password> --host=<External IP Address>

This reports the same error that access is denied at it's own domain name.

I can connect to localhost with the correct details so the daemon is running locally.

Any ideas?