The likelihood is that 'localhost' would be the hostname.
Have to admit that I'm not sure why people choose to test database locally; unless you are in a wi-fi dead-zone.
I set only one connection per site with hostnames as 'www.mysitenames.co.uk' and the db, username, password as you have them. Set my hosted databases to accept my referral.
Set and forget!