Good morning guys and thank you all for your replies.
I forgot to mention this earlier that my connection is with Xojo Cloud and not with DigitalOcean.
The strange thing is that I was working fine with the connection about a week ago and the only
changes I made in the code involve additional controls on the GUI and not MySQL connection.
I tried your suggestions above and now I get a new error:
Error connecting: Can’t connect to MySQL server on ‘127.0.0.1’ (61)
However I can still connect fine with Workbench with the following credentials (as before):
SSH Host: 178.128.226.123
SSH Username: dbadmin
{some SSH Password}
MySQL Hostname: localhost
MySQL Server Port: 3306
Username: dbadmin
{some MySQL Password}
Thank you again.
Are you trying to connect from a local app or an app that is running on the XojoCloud to your MySQL server?
Are you using 3306 as port in your application’s connection and localhost as hostname?
Hi Steve and Jose,
I have tried both. Running it locally and deploying it on Xojo Cloud. Still no luck!
Yes, the port is 3306 as I have mentioned it in my last post:
MySQL Hostname: localhost
MySQL Server Port: 3306
I mean in the Xojo Application, that is what you pasted for the SSH Tunnel (remote connection). Before you said something about 3307, and be sure not be confused with that
Hi Jose,
I apologize for not making it clear.
Yes, I also use port 3306 in my web app MySQL-connection.
The port 3307 issue was a long time ago and I have resolved that.
Thank you.
You will not be able to connect to your XojoCloud Mysql server from a local application without a ssh connection to your server. Is your Xojocloud server also your MySql server?
Hi Steve,
In my Xojo Cloud I have enabled both MySQL and SSH Tunnel. Initially I thought I would use Xojo Cloud as my MySQL
database platform and tried to transfer and extract/restore my db backup, but the way it actually worked was to
tunnel back to my local MySQL and that is why the MySQL Host is localhost.
I don’t know if I got it all wrong, but it was actually working.
Do I need to have additional SSH connection open?
When your trying to run an app on your Xojo cloud server trying to access the Mysql server on your Xojocloud server you do not need an ssh connection. When your trying to access your Xojocloud MySql server from your local machine then you need the ssh tunnel. I do not believe you can set your XojoCloud server to see a Mysql server hosted locally on your machine without some assistance from Xojo.
Your Xojocloud hosted app should use localhost and port 3306 to connect to your Xojocloud hosted Mysql server.
Hi Steve,
I kind of understand what you posted. Let me say it in my own words and tell me if I am right.
- If I am running the web app locally (meaning not deployed) I do need an SSH Tunnel.
otherwise
- After I deploy it on Xojo Cloud there is no need for an SSH Tunnel.
I can surf the internet for SSH Tunnelling but if you can help me out on this it will be great.
Does Xojo Cloud host MySQL databases? What I mean: is there a way to transfer and extract any MySQL db
on Xojo Cloud in order for any web app to access it without the need to connect on my local one?
Thank you for your time.
-
Yes if you are hosting your data on a XojoCloud Mysql server and trying to access it from a local app. You would need a SSH tunnel established between your local machine and your XojoCloud Mysql server. Just like Workbench is doing.
-
If your app is deployed to XojoCloud and trying to accessing your XojoCloud MySQL Server. It can just use Localhost and Port 3306 and connect just fine. It is only visible to itself. The outside internet can access it in that way.
Yes XojoCloud allows you to setup a MySql database on the server. You have to go through the setup and get the authentication information. You have to go to the XojoCloud control panel to set that up. You can also ask Xojo to setup a virtuall network if you have multiple Xojocloud servers so your other XojoCloud servers can see your MySQL server.
We have multiple XojoCloud Servers accessing multiple XojoCloud Mysql servers.
Hi Steve,
Thank you for your reply.
Very informative and well stated.
Take care.