It looks like the user has access to localhost only. So you have to set all ip access by '%'.
On your server run, access mysql from command line:
$mysql -u root -p
Then run this command in mysql shell:
>use mysql
>GRANT ALL ON *.* to root@'%' IDENTIFIED BY 'yourpassword';
>FLUSH PRIVILEGES;
Have a nice time.