Hello,
I try to connect a web app running in Xojo Cloud to a remote MySQL database. Remote access to the database is enabled and
when I run the web app in debug mode in my local iMac the app can connect to the remote MySQL database. When I upload the app to Xojo Cloud I get the message: Can’t connect to MySQL server on ‘here-comes-the-server-address.com’ (4)
Can you give me some hint what’s going wrong?
[quote=147311:@Christian Mézes]Hello Tim,
in the app open event I did this:
dim fwp as New XojoCloud.FirewallPort(3306, XojoCloud.FirewallPort.Direction.Outgoing)
fwp.Open()
The app seems to work as expected now. Thanks![/quote]
Make sure you keep a reference to fwp as long as you need that port to stay open. If you don’t, it will automatically close and your connection will be closed.
Also, please seriously consider what you’re doing. Having a MySQL database directly available on the internet is an invitation for trouble. You should really have an API of some sort which is publicly available and then have that access the database privately.