Ghost - app fails to start as it cannot login to into MySQL
-
Check the services status in the dashboard to make sure MySQL is running and healthy. Restart if necessary.
-
@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.
-
@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.
-
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?
-
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?
-
@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?
@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.
-
@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.
-
@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.
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