Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. How to expose a port (mysql)

How to expose a port (mysql)

Scheduled Pinned Locked Moved Solved Support
6 Posts 4 Posters 2.3k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    ChicagoGregg
    wrote on last edited by
    #1

    I would like to modify a container (e.g. MySQL) to expose a port to the host.

    How can I change this configuration within Cloudron to do this?

    One of the reasons for this is so I can connect into MySQL remotely (local network) for development purposes.

    Thanks,

    -gregg

    ? 1 Reply Last reply
    0
    • C ChicagoGregg

      @atridad Thanks for the reply.

      I'd like to access the tcp/3306 on the mysql container directly from the local network. I need this for such command line tools such as mysqldump & mysql (for importing) commands as well as some GUI tools.

      I'm assuming you're referring to ssh'g into the cloudron server and then access mysql on the mysql container (tcp/3306) via the command line... while that would work, it wouldn't allow me to access mysql directly from the local network. I wonder if I could proxy through via SSH.

      Is there any way I could configure the container image to expose this port on the host itself so I can access it directly? (even if it's on a different port)

      (Hmm, I wonder if I could use iptables with FORWARD?)

      How can I find the MySQL root password for the cloudron host (if I ever need it?)? I found out how to get the root password for the MySQL container host (but not yet on the main cloudron host).

      Thanks!

      -gregg

      nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #4

      @chicagogregg would a solution using an SSH tunnel as described at https://forum.cloudron.io/topic/2200/external-mysql/5 also work for you?

      C 1 Reply Last reply
      1
      • C ChicagoGregg

        I would like to modify a container (e.g. MySQL) to expose a port to the host.

        How can I change this configuration within Cloudron to do this?

        One of the reasons for this is so I can connect into MySQL remotely (local network) for development purposes.

        Thanks,

        -gregg

        ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #2

        @chicagogregg If you need to work with the mySQL db for a specific app this can be done via the terminal in each app. Also, you could just SSH into your server and access it that way.

        C 1 Reply Last reply
        0
        • ? A Former User

          @chicagogregg If you need to work with the mySQL db for a specific app this can be done via the terminal in each app. Also, you could just SSH into your server and access it that way.

          C Offline
          C Offline
          ChicagoGregg
          wrote on last edited by ChicagoGregg
          #3

          @atridad Thanks for the reply.

          I'd like to access the tcp/3306 on the mysql container directly from the local network. I need this for such command line tools such as mysqldump & mysql (for importing) commands as well as some GUI tools.

          I'm assuming you're referring to ssh'g into the cloudron server and then access mysql on the mysql container (tcp/3306) via the command line... while that would work, it wouldn't allow me to access mysql directly from the local network. I wonder if I could proxy through via SSH.

          Is there any way I could configure the container image to expose this port on the host itself so I can access it directly? (even if it's on a different port)

          (Hmm, I wonder if I could use iptables with FORWARD?)

          How can I find the MySQL root password for the cloudron host (if I ever need it?)? I found out how to get the root password for the MySQL container host (but not yet on the main cloudron host).

          Thanks!

          -gregg

          nebulonN 1 Reply Last reply
          0
          • C ChicagoGregg

            @atridad Thanks for the reply.

            I'd like to access the tcp/3306 on the mysql container directly from the local network. I need this for such command line tools such as mysqldump & mysql (for importing) commands as well as some GUI tools.

            I'm assuming you're referring to ssh'g into the cloudron server and then access mysql on the mysql container (tcp/3306) via the command line... while that would work, it wouldn't allow me to access mysql directly from the local network. I wonder if I could proxy through via SSH.

            Is there any way I could configure the container image to expose this port on the host itself so I can access it directly? (even if it's on a different port)

            (Hmm, I wonder if I could use iptables with FORWARD?)

            How can I find the MySQL root password for the cloudron host (if I ever need it?)? I found out how to get the root password for the MySQL container host (but not yet on the main cloudron host).

            Thanks!

            -gregg

            nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #4

            @chicagogregg would a solution using an SSH tunnel as described at https://forum.cloudron.io/topic/2200/external-mysql/5 also work for you?

            C 1 Reply Last reply
            1
            • nebulonN nebulon

              @chicagogregg would a solution using an SSH tunnel as described at https://forum.cloudron.io/topic/2200/external-mysql/5 also work for you?

              C Offline
              C Offline
              ChicagoGregg
              wrote on last edited by
              #5

              @nebulon I wound up using an SSH tunnel to connect into the MySQL server (mysql container) through the cloudron server.

              I didn't know about that link you sent to me, but that's exactly what I did with the:

              env | grep CLOUDRON_MYSQL_

              to get the username/password.

              Since I'm tunneling via SSH I don't have a need to expose the port from the cloudron server. However, if I do need to, I probably can use iptables FORWARD. I'll stay away from that in the meantime.

              Thanks for the help. Let's close this thread as resolved.

              Thanks,

              -gregg

              doodlemania2D 1 Reply Last reply
              0
              • C ChicagoGregg

                @nebulon I wound up using an SSH tunnel to connect into the MySQL server (mysql container) through the cloudron server.

                I didn't know about that link you sent to me, but that's exactly what I did with the:

                env | grep CLOUDRON_MYSQL_

                to get the username/password.

                Since I'm tunneling via SSH I don't have a need to expose the port from the cloudron server. However, if I do need to, I probably can use iptables FORWARD. I'll stay away from that in the meantime.

                Thanks for the help. Let's close this thread as resolved.

                Thanks,

                -gregg

                doodlemania2D Offline
                doodlemania2D Offline
                doodlemania2
                App Dev
                wrote on last edited by
                #6

                @chicagogregg By chance did you or someone write up a step by step guide on this? I'm needing to do something similar but for whatever reason, ssh proxying and I don't seem to get along.

                1 Reply Last reply
                0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Bookmarks
                • Search