I’d be willing to wager that either the username, password or IP that you’re using are incorrect. I’d recommend contacting Fasthosts to confirm the details that you should be using.
If you’re using Fasthosts shared hosting then you need to use the IP of the database. localhost or the web server IP (which will be prominently on display in the control panel) won’t work.