I’m migrating a Ghost-CLI to Docker so that I can upgrade. Following the instructions (including those here) and everything goes fine until i run the migrate script.
At that point, I get what I think is a MySQL permissions error during the migration process.
Running the recovery script puts everything back how it was, but I’m at a bit of a loss for how to address this. I assume from the description it’s some kind of permissioning error with the user that Ghost is using to connect to MySQL, but doing searches on the term tends to yield answers related to old versions of Ubuntu/MySQL.
So I don’t want to just poke things with a stick. Or start running random bits of MySQL from old Stack Overflow articles!
We presume what’s happening is that the part of the script that creates the docker mysql instance is creating it to require a password (or mysql does that by default) and then not using that password itself when it tries to import the databases.
presumably there’s something, somewhere that allows us to stop this happening?
We’ve paired with @garius to figure out what’s up. The important thing to note is that changes to the environment variables for database passwords need to be followed up by nuking the /opt/ghost/data/mysql folder—the reason for that is simple: these are setup when DB is initializing and if/when it’s already initialized, these passwords won’t update. It’s safe to remove that directory and re-run the migration script.