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 169 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.
  • J Offline
    J Offline
    jdeighton
    wrote last edited by
    #1

    I have a couple of Ghost instances running, one of them has stopped being able to log into its MySQL database, and so refuses to start.

    In the Ghost log I see:

    Jun 29 16:36:39 ==> Start ghost
    Jun 29 16:36:39 ==> Clear potential migration lock
    Jun 29 16:36:39 mysql: [Warning] Using a password on the command line interface can be insecure.
    Jun 29 16:36:39 ERROR 1045 (28000): Access denied for user '7a3734398b393a1d'@'37d74e68-8cfa-4dfe-88e9-faafd777950b.cloudron' (using password: YES)
    Jun 29 16:36:39 json: updated "/app/data/config.production.json" in-place
    Jun 29 16:36:39 json: updated "/app/data/config.production.json" in-place
    Jun 29 16:36:39 json: updated "/app/data/config.production.json" in-place
    Jun 29 16:36:39 ===> Copy frotend/public folder for asset generation
    Jun 29 16:36:39 ==> Loading /app/data/env for potential overrides
    Jun 29 16:36:39 ==> Ensure permissions
    Jun 29 16:36:39 ==> Migrating database
    Jun 29 16:36:39 [2025-06-29 20:36:39] ERROR Access denied for user '7a3734398b393a1d'@'37d74e68-8cfa-4dfe-88e9-faafd777950b.cloudron' (using password: YES)
    Jun 29 16:36:39
    Jun 29 16:36:39 Access denied for user '7a3734398b393a1d'@'37d74e68-8cfa-4dfe-88e9-faafd777950b.cloudron' (using password: YES)
    Jun 29 16:36:39 2025-06-29T20:36:39Z
    Jun 29 16:36:39 "Unknown database error"
    Jun 29 16:36:39 2025-06-29T20:36:39Z
    Jun 29 16:36:39 Error ID:
    Jun 29 16:36:39 500
    Jun 29 16:36:39 2025-06-29T20:36:39Z
    Jun 29 16:36:39 Error Code:
    Jun 29 16:36:39 DATABASE_CREATION_FAILED
    Jun 29 16:36:39 2025-06-29T20:36:39Z
    Jun 29 16:36:39 ----------------------------------------
    Jun 29 16:36:39 2025-06-29T20:36:39Z
    Jun 29 16:36:39 Error: Access denied for user '7a3734398b393a1d'@'37d74e68-8cfa-4dfe-88e9-faafd777950b.cloudron' (using password: YES)
    Jun 29 16:36:39 at /home/cloudron/ghost/versions/5.126.1/node_modules/knex-migrator/lib/database.js:134:19
    Jun 29 16:36:39 at /home/cloudron/ghost/versions/5.126.1/node_modules/knex-migrator/lib/database.js:57:19
    Jun 29 16:36:39 at Packet.asError (/home/cloudron/ghost/versions/5.126.1/node_modules/mysql2/lib/packets/packet.js:740:17)
    Jun 29 16:36:39 at ClientHandshake.execute (/home/cloudron/ghost/versions/5.126.1/node_modules/mysql2/lib/commands/command.js:29:26)
    Jun 29 16:36:39 at Connection.handlePacket (/home/cloudron/ghost/versions/5.126.1/node_modules/mysql2/lib/base/connection.js:475:34)
    Jun 29 16:36:39 at PacketParser.onPacket (/home/cloudron/ghost/versions/5.126.1/node_modules/mysql2/lib/base/connection.js:93:12)
    Jun 29 16:36:39 at PacketParser.executeStart (/home/cloudron/ghost/versions/5.126.1/node_modules/mysql2/lib/packet_parser.js:75:16)
    Jun 29 16:36:39 at Socket.<anonymous> (/home/cloudron/ghost/versions/5.126.1/node_modules/mysql2/lib/base/connection.js:100:25)
    Jun 29 16:36:39 at Socket.emit (node:events:518:28)
    Jun 29 16:36:39 at addChunk (node:internal/streams/readable:561:12)
    Jun 29 16:36:39 at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    Jun 29 16:36:39 at Readable.push (node:internal/streams/readable:392:5)
    

    If I put the app into repair mode and try to log into the MySQL instance directly from the webterminal, same problem - login refused:

    root@37d74e68-8cfa-4dfe-88e9-faafd777950b:/# mysql --user=${CLOUDRON_MYSQL_USERNAME} --password=${CLOUDRON_MYSQL_PASSWORD} --host=${CLOUDRON_MYSQL_HOST} ${CLOUDRON_MYSQL_DATABASE} 
    mysql: [Warning] Using a password on the command line interface can be insecure.
    ERROR 1045 (28000): Access denied for user '7a3734398b393a1d'@'37d74e68-8cfa-4dfe-88e9-faafd777950b.cloudron' (using password: YES)
    

    I've tried rolling back to a backup version from before the problems, but still having the same issue on startup now. I've tried rolling back to various points and versions, but this does not seem to change the behavior.

    I've also tried restarting the MySQL service on the cloudron host, but that also made no difference.

    Anyone have any clues on the best way to troubleshoot this?

    Thanks.

    1 Reply Last reply
    1
    • 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