Two steps:
set up user with wildcard:
create user 'root'@'%' identified by 'some_characters';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
IDENTIFIED BY PASSWORD 'some_characters'
WITH GRANT OPTION
vim /etc/my.cnf
add the following:
bind-address=0.0.0.0
restart server, you should not have any problem connecting to it.