TCP connection to database not working

Sorry, I don’t know the name of my project but it is my only one.
I set up a MySQL database on GearHost, installed MySQL with nvm, and put the data for it in the .env file, but when I try to connect it throws me the ETimedOut error with after some googling I found out the TCP connection can’t be established. How do I fixed this?

This could be because you are using a free service. You can host one database instance for free on Google Cloud Platform. Or for development you could host it on your computer and use port forwarding so Glitch can access it.

I will try hosting it on google.