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
  • 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 | Demo | Docs | Install
  1. Cloudron Forum
  2. Ghost
  3. Ghost - app fails to start as it cannot login to into MySQL

Ghost - app fails to start as it cannot login to into MySQL

Scheduled Pinned Locked Moved Ghost
11 Posts 4 Posters 159 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.
  • robiR Offline
    robiR Offline
    robi
    wrote last edited by
    #2

    Check the services status in the dashboard to make sure MySQL is running and healthy. Restart if necessary.

    Conscious tech

    J 1 Reply Last reply
    1
    • robiR robi

      Check the services status in the dashboard to make sure MySQL is running and healthy. Restart if necessary.

      J Offline
      J Offline
      jdeighton
      wrote last edited by
      #3

      @robi Tried that, shows as healthy, restarted anyway - no change. Other apps (including other Ghost instances) are all running OK on the same box.

      Is there a way to log into MySQL as root to see if there is specific issue with that database?

      robiR 1 Reply Last reply
      0
      • jamesJ Offline
        jamesJ Offline
        james
        Staff
        wrote last edited by
        #4

        Hello @jdeighton
        Can you please download the latest app backup to your drive directly.
        In that backup the database should be there as well as sql file.
        In that file, can you confirm that the database name is correct?

        1 Reply Last reply
        0
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote last edited by
          #5

          @jdeighton Have you tried cloning the app from the latest backup - https://docs.cloudron.io/backups/#clone-app ? This creates a new database and fresh credentials.

          That said, this is the first time I have seen an error like this.... Let me know what happens with a clone and that will give an idea of something wrong with MySQL addon itself or whether it is just this one app.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jdeighton
            wrote last edited by
            #6

            @girish - Thanks, cloning the app backup to a new name, renaming the original to something else, the renaming the clone to the original name sorted everything out - appreciate the suggestion.

            @james I'll try downloading the backup locally and examining the sql file to check what it was doing in there.

            1 Reply Last reply
            0
            • J Offline
              J Offline
              jdeighton
              wrote last edited by
              #7

              The sqldump file had the same database name listed in there:

              -- MySQL dump 10.13  Distrib 8.0.41, for Linux (x86_64)
              --
              -- Host: localhost    Database: 7a3734398b393a1d
              -- ------------------------------------------------------
              -- Server version	8.0.41-0ubuntu0.24.04.1
              <snip>
              

              Not sure if the mysqldump thinking it was localhost instead of the 37d74e68-8cfa-4dfe-88e9-faafd777950b.cloudron' name could be part of the issue?

              jamesJ 1 Reply Last reply
              1
              • J jdeighton

                The sqldump file had the same database name listed in there:

                -- MySQL dump 10.13  Distrib 8.0.41, for Linux (x86_64)
                --
                -- Host: localhost    Database: 7a3734398b393a1d
                -- ------------------------------------------------------
                -- Server version	8.0.41-0ubuntu0.24.04.1
                <snip>
                

                Not sure if the mysqldump thinking it was localhost instead of the 37d74e68-8cfa-4dfe-88e9-faafd777950b.cloudron' name could be part of the issue?

                jamesJ Offline
                jamesJ Offline
                james
                Staff
                wrote last edited by
                #8

                @jdeighton Thanks for that.
                Not sure tho, need to investigate.

                1 Reply Last reply
                0
                • J jdeighton

                  @robi Tried that, shows as healthy, restarted anyway - no change. Other apps (including other Ghost instances) are all running OK on the same box.

                  Is there a way to log into MySQL as root to see if there is specific issue with that database?

                  robiR Offline
                  robiR Offline
                  robi
                  wrote last edited by
                  #9

                  @jdeighton said in Ghost - app fails to start as it cannot login to into MySQL:

                  Is there a way to log into MySQL as root to see if there is specific issue with that database?

                  Generally yes, open the app web terminal and click the paste DB credentials button in the top right.

                  Conscious tech

                  J 1 Reply Last reply
                  1
                  • robiR robi

                    @jdeighton said in Ghost - app fails to start as it cannot login to into MySQL:

                    Is there a way to log into MySQL as root to see if there is specific issue with that database?

                    Generally yes, open the app web terminal and click the paste DB credentials button in the top right.

                    J Offline
                    J Offline
                    jdeighton
                    wrote last edited by
                    #10

                    @robi That gets me into the DB for the individual app on that particular database - was wondering if it's possible to log into the MySQL service directly - that would let me list what databases exist, what users exist, and what permissions each user has.

                    jamesJ 1 Reply Last reply
                    0
                    • J jdeighton

                      @robi That gets me into the DB for the individual app on that particular database - was wondering if it's possible to log into the MySQL service directly - that would let me list what databases exist, what users exist, and what permissions each user has.

                      jamesJ Offline
                      jamesJ Offline
                      james
                      Staff
                      wrote last edited by
                      #11

                      Hello @jdeighton
                      Yes, that is possible. Here is also part of this in the documentation: https://docs.cloudron.io/guides/connect-mysql/
                      But! Not documented is the part how to access the main DB, since this is risky and most users should not do that.
                      It is present in multiple forum posts so here.

                      While connect to the root user on the server, run:

                      docker exec -ti mysql /bin/bash
                      

                      and inside the container you can simply run:

                      mysql -uroot -p$CLOUDRON_MYSQL_ROOT_PASSWORD
                      
                      1 Reply Last reply
                      1
                      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