well, clearly you haven’t specified the MySQL server host correctly.
you should consider tunnelling through ssh though if your database contains anything remotely sensitive. even logging in sends your db password in the clear. you can do this on unix by:
ssh -L 3307:mysql.example.com:3306 firstname.lastname@example.org
then just connect to localhost:3307