To allow external access to the mysql database on a remote server, it is to configure it for external access.
Can you connect to MySQL from your own host? If not, see if it is running.
sudo service mysql status
If the status is as 'active', make sure the /etc/mysql/my.cnf file contains the bind-address line 127.0.0.1. If so, comment on it with # or remove it.
Also check that your firewall is active:
sudo ufw status verbose
If it is, it may be necessary to unlock port 3306 - or one set as default.
sudo ufw allow from 192.168.* to any port 3306
I hope I have helped! Thanks!