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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved cli: change mysql root password

    Support
    server
    4
    10
    540
    Loading More Posts
    • 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.
    • root_iam
      root_iam last edited by girish

      hi,

      I reset the mysql root password on the cli because I mysql wasn't starting again some day and I couldn't access it per cli...
      Now the box is not starting anymore because of the wrong mysql root password.

      Where can I change this?

      Thanks a lot!!

      1 Reply Last reply Reply Quote 0
      • girish
        girish Staff last edited by

        @root_iam The mysql root password must be set to password (sic). If you reset the mysql password back to that, the box code will work. Note that since the mysql server is only internal and listens only on loopback this is not a security issue. There is no need to change the default password.

        1 Reply Last reply Reply Quote 0
        • murgero
          murgero App Dev last edited by

          I think this is bad practice. You should generate a password instead on first startup.

          --
          https://urgero.org
          ~ Professional Nerd. Freelance Programmer. ~
          Matrix: @murgero:urgero.org

          1 Reply Last reply Reply Quote 0
          • girish
            girish Staff last edited by

            mm, this is for the internal mysql server and not the one used for the apps. apps have their own mysql server for which password is indeed auto-generated. the internal mysql server is not accessible by apps either.

            1 Reply Last reply Reply Quote 0
            • root_iam
              root_iam last edited by

              Thanks that worked!

              Now I cannot reconfigure the ttrss app. The error is the following:
              "Error setting up mysql: Error: connect ECONNREFUSED 172.18.0.6:3000 RepairLogsClose"

              netstat -tlnp show following for mysql:
              "tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1914/mysqld "

              Was there a recent port change? What is the recommended way to fix this? Which port is correct for cloudron?

              Thanks! 🙂

              1 Reply Last reply Reply Quote 0
              • girish
                girish Staff last edited by

                @root_iam That's great! Can you give the mysql service a restart? services -> mysql -> restart.

                3000 is the port in which the mysql service API runs. 3306 is the actual mysql service itself. It seems that for some reason the box code is unable to reach the mysql service.

                If it doesn't work, can you check if docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" mysql prints the IP above (i.e 172.18.0.6).

                1 Reply Last reply Reply Quote 0
                • root_iam
                  root_iam last edited by

                  The service is hanging after every reboot. It never changes the state...
                  The restart arrows are circling al the time.

                  087017c0-4c3b-4acf-9789-872fa9013482-image.png

                  The output was the following:
                  florian@my:~$ sudo docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" mysql
                  [sudo] password for florian:

                  Thanks for ypur help!

                  1 Reply Last reply Reply Quote 0
                  • nebulon
                    nebulon Staff last edited by

                    So the docker command you ran did not print out the ip address?

                    Besides that if the mysql status never reaches a good state (green) then it probably won't even start up. Can you take a look at the logs? (you can see them clicking on the logs button for the mysql service)

                    1 Reply Last reply Reply Quote 0
                    • girish
                      girish Staff last edited by

                      I think if mysql container is not running then the inspect command does not print anything.

                      If we can see the mysql logs that will help.

                      1 Reply Last reply Reply Quote 0
                      • nebulon
                        nebulon Staff last edited by

                        Is this still an issue? Otherwise I will close this thread.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB