i believe you are hosting the MySQL db server on 000webhost.com or something like that right, (idhostinger, or others). They provide the free database server and you can use it, BUT it only works on localhost. what I mean is they do not open the 3306 port.
If you have a MySQL Manager (MySQL Workbench, QueryBrowser, Server Administrator, or others), and ask to connect to your free MySQL server, connection will be always rejected unless you pay for the premium services.
indo?