Install Ghost on Debian 12 with MySQL [Not available]

I’m looking to upgrade my server where I have my Ghost (currently Debian 11) and I just realized that there is no package available for MySQL 8 on Debian 12.

In the Debian Wiki they warn:

MySQL was replaced by Mariadb in Stretch. This page primarily documents the packages for Jessie and older releases.

Therefore, Ghost cannot be installed on Debian 12. I understand that there is no possibility of using MariaDB, I had read a long time ago that support was stopped. Do you have any ideas about this?

You can install the MySQL community edition. Simply add the repository.

The community repository is not working. Actually, there is no version for Debian 12 “Bookworm”:

Ign:10 bookworm InRelease                           
Err:11 bookworm Release
  404  Not Found [IP: 80]
Reading package lists... Done
E: The repository ' bookworm Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Installing the Bullseye version gives a dependency error and the mysql-server package cannot be installed.


In the first article, there is this note:

HOWEVER, Please note that as of this writing, the repository is not supported for Debian 12 bookworm.

so the only alternative left is to install it using Docker… if you don’t use docker it seems a bit unnecessary to install docker only for mysql.

I’m running Ghost with MariaDB10 on Debian12 (via HestiaCP, it defaults to MariaDB10, though MySQL8 is an option). I choose the default by accident -I run dozens of other (cough WordPress) sites. While MariaDB is faster and offers more storage engine choices, I’m curious to know what is it exactly that doesn’t work in Ghost on MariaDB? I can post, query, and login without any issues on my Ghost sites running on MariaDB.

Someone mentioned they were getting errors with statistics. And others here simply mention that they can’t install MySQL8 on Debian12 (HestiaCP is a control panel that just adds package repos and runs installers -just like one would manually). Not sure what the difficulty is with installing MySQL8 on Debian 12 if one does it manually.

But back to my inquiry… anyone seeing actual broken Ghost features because of MariaDB or know of Ghost-MySQL8 specific features that break on MariaDB?

I’m not seeing issues to date.

Which version of Ghost are you currently using on your server?

As far as I understand, since Ghost 5.x it no longer supports MariaDB and only supports installation with MySQL-8. (More info: How to install & setup Ghost on Ubuntu 16.04, 18.04, 20.04 or 22.04)

I don’t remember which release was the one where MariaDB was giving a lot of problems. Items were not loading in /ghost, I remember looking at the changelog it said that MariaDB support had been removed.

MySQL-8 cannot be installed on Debian 12 due to missing packages and dependencies to do so. I explain this in my posts above.

There were problems with the admin panel at 5.21. Of course, the admin panel just got replaced, so I have no clue if the incompatibility persisted or what else might also be incompatible since 5.21. I think most folks switched over at that point.

1 Like

I mean it clearly states it’s “unsupported”, so I guess I should dump and reload under MySQL8 (except MySQL8 isn’t supported in Debian Linux 12; a pretty popular Linux distribution); but I am rather curious about what is it specifically the Ghost team has gone low-level on that makes it incompatible.

AFAIK, MariaDB’s MySQL syntax is identical, both engines support InnoDB specific features. There are some very low-level ‘nuances’ with unconventional column value initializations; but one would really have to go out of there way to invoke that, bordering intensional incompatibility.

Perhaps it’s a NodeJS specific connection thing? Curious.

Ghost is not necessarily incompatible, but MariaDB is not supported. No one to my knowledge is maintaining a list of what breaking changes there might be and the Ghost devs aren’t testing with MariaDB before releases.

If you’d like to get some reasonable confidence if MariaDB is compatible today, you could modify the test suite or C/I pipeline code to run all the tests against MariaDB instead of MySQL. If they pass, there’s a reasonable chance that Ghost is compatible with MariaDB today. But there’s no guarantee that will hold true tomorrow, next week or next year. Each time before you upgrade Ghost with your MariaDB, you should re-run the test suite and see if there any failures. You could potentially automate runs of the test suite against MariaDB to continually check.

There was also a related thread on the topic a few days ago: Ghost 5 + MySQL 8, what specific functionality?

There are clearly some other people interested to know the exact compatibility issues if you’d like to investigate and start maintaining a list and automate compatibility checks.

1 Like