you firstly could check if the user truly has the privilege to access the DB or not by using the next command:
SHOW GRANTS FOR 'username'@'host';
if not, use this command
GRANT USAGE ON database.* TO 'username'@'host';
FLUSH PRIVILEGES;
if he has the privilege , the password might be wrong , try to change it and don't forget to add FLUSH PRIVILEGES; to make sure the command is applied now (it's implied used after revoke and grant )
ALTER USER 'username'@'host' IDENTIFIED BY 'newpassword';
FLUSH PRIVILEGES;
I guess the reason of your problem is that: you might have written the command like that
GRANT ALL ON company.* TO 'user_name'@'localhost'
so he can't access via another computer .