How to deploy a web app on Digital Ocean ubuntu server

  1. ‹ Older
  2. 4 months ago

    Hi Jason,

    The info I enter in MySQL Workbench is:

    SSH Hostname:
    SSH Username: dbadmin
    some SSH password (given by XOJO Cloud)
    MySQL Hostname: localhost
    MySQL Server Port: 3306
    Username: dbadmin
    some MySQL password (given by XOJO Cloud)

    If you can tell me where my mistake is I will try it a.s.a.p.
    Thank you for your reply Jason.

    Take care.

  3. John A

    Sep 18 Pre-Release Testers, Xojo Pro Answer Las Vegas, Nevada

    @NIKOSZACHARAKIS However when I execute the "ssh..." command the terminal just stays idle! I also cannot connect with MySQL Workbench.

    A tunnel is just a pipeline between the two computers, that forwards a local connection securely to the remote computer.
    It won't do anything visible.

    The -L option is local_port:remote_address:remote_port
    So this command:

    ssh -L 3306:localhost:3306 dbadmin@ -N

    creates a tunnel to 'localhost', looping back to yourself.

    Try this one:

    ssh -L 3306: dbadmin@ -N

    Then your workbench connection should work.

  4. Hi John,

    WOW!!! My Workbench finally works.
    Thank you very much for the enlightening info.

    I would like to thank all of you guys for the informative replies and your time spent to help me.
    Take care to you all.


  5. Alberto D

    Sep 27 Pre-Release Testers, Xojo Pro

    Today I tested digital ocean ubuntu server and a simple Xojo web app. This is what I did:

    After I tested that cgi-bin "Hello World" sample was working, I created a simple Xojo web app, build it as cgi, uploaded to /usr/lib/cgi-bin and it didn't work. I got a message saying: "Cannot write to config at path /usr/lib/cgi-bin/config.cfg. Permission denied", so I had to change the owner of the file from root to www-data with:

    sudo chown www-data config.cfg

    It looks like after the first run it changed:




    I guess I may need to change the owner:group for that file and others and still several things to configure.

    I will say that is better to stick with Xojo Cloud or other provider with support, specially for those without Linux server experience.

  6. 3 months ago

    Hi Alberto,

    Thank you for your post. I will try it out this week and let you know.

    I am having a slight problem, after I managed to connect and deploy my web apps.
    Today when I try to debug my modifications I get the following connection error:

    Error connecting: Host '' is not allowed to connect to this MariaDB server

    I checked MySQL port and it is 3306. Also I executed John's suggestion
    ssh -L 3306: dbadmin@ -N
    and it works fine. I also connect through WorkBench!

    Any ideas why I cannot connect anymore?

    Thank you

  7. José M

    Oct 8 Pre-Release Testers, Xojo Pro Spain

    @NIKOSZACHARAKIS Any ideas why I cannot connect anymore?

    Thank you

    Server's firewall or MySQL does not accept external connections.

  8. Paul B

    Oct 8 Pre-Release Testers, Xojo Pro Europe (UK, Somerset)

    It may be that you have to setup remote access. My provider has a ' cpanel' item called Remote Mysql, it allows me to provide an IP address or range of addresses that can access my databases. Any connections from these addresses are then allowed. You may have something similar.

  9. Alberto D

    Oct 8 Pre-Release Testers, Xojo Pro

    Nikos, if you are talking about Digital Ocean, I can tell you that the default configuration will not let you connect externally to the database server.

    I don't normally use Digital Ocean, just did this to learn. Maybe, in one of the linked documents, there is a way to change that, but my guess: this is done to have a more secure server.

  10. 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 '' (61)

    However I can still connect fine with Workbench with the following credentials (as before):
    SSH Host:
    SSH Username: dbadmin
    {some SSH Password}
    MySQL Hostname: localhost
    MySQL Server Port: 3306
    Username: dbadmin
    {some MySQL Password}

    Thank you again.

  11. Steve K

    Oct 8 Pre-Release Testers, Xojo Pro Topeka, KS

    Are you trying to connect from a local app or an app that is running on the XojoCloud to your MySQL server?

  12. José M

    Oct 8 Pre-Release Testers, Xojo Pro Spain

    Are you using 3306 as port in your application's connection and localhost as hostname?

  13. 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

  14. José M

    Oct 8 Pre-Release Testers, Xojo Pro Spain

    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

  15. 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.

  16. Steve K

    Oct 8 Pre-Release Testers, Xojo Pro Topeka, KS

    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?

  17. 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?

  18. Steve K

    Oct 8 Pre-Release Testers, Xojo Pro Topeka, KS

    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.

  19. Hi Steve,

    I kind of understand what you posted. Let me say it in my own words and tell me if I am right.
    1. If I am running the web app locally (meaning not deployed) I do need an SSH Tunnel.
    2. 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.

  20. Steve K

    Oct 8 Pre-Release Testers, Xojo Pro Topeka, KS
    Edited 3 months ago

    1. 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.

    2. 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.

  21. Hi Steve,

    Thank you for your reply.
    Very informative and well stated.

    Take care.

or Sign Up to reply!