Cause of error: mysql database only allows local ip access;
Workaround: Modify the mysql table settings for all ip are accessible;
Log database using the following command:
use mysql;
. Grant All privileges ON * * to ' root ' @ ' % ' IDENTIFIED by ' your database password ' ;
flush privileges;
To see if the amendment is successful
select host,user from user;