How to connect to a Remote DB using CraftCMS 3.1+
Probably the database doesn't listen for connections from the outside world. So yeah you'd need some kind of an ssh tunnel to connect to it. I think you may find, though, that doing development via a remote db can be pretty slow; check out Database &amp; Asset Syncing Between Environments in Craft CMS