Without more details on the error it's hard to guess, but if I have to guess I'd say your username is only allowed to connect from localhost. Mysql users have both a username and a host, and both must match for the connection to be allowed.
You could create another user allowed to connect remotely with something like CREATE USER username@'your.ip.address' IDENTIFIED BY 'some_password'
And then granting him access to the databases you want (see http://dev.mysql.com/doc/refman/5.1/en/grant.html).
Another thing to check would be that the port mysql is using (3306 by default) is open to the outside world and that the mysql server is listening on all interfaces (see your my.cnf config file).