Ok I figured it out:
I had to log into ssh bash and go to the mysql terminal. Then I had to add privileges to the user trying to access the database from a different domain. For anyone that is interested these are the commands used:
CREATE USER 'username'@'IP' IDENTIFIED BY 'username';
GRANT SELECT ,
INSERT ,
UPDATE ,
DELETE ,
CREATE ,
DROP ,
FILE ,
INDEX ,
ALTER ,
EXECUTE ON * . * TO 'username'@'IP' IDENTIFIED BY 'password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
GRANT ALL PRIVILEGES ON `database` . * TO 'username'@'IP';
The above will create a user, give permissions on that IP to access the DB as well as permissions to modify it.