You dont have permission to connect from a REMOTE host to your MySQL server.
In MySQL, you can provide privileges depending upon user connecting from specific hosts.
The following query will allow only the user to access from “localhost” ( this is probably your case )
GRANT ALL PRIVILEGES ON *.* TO user@localhost
IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
You have to issue a GRANT stmt like
GRANT ALL PRIVILEGES ON *.* TO a@%
IDENTIFIED BY 'some_pass' WITH GRANT OPTION;