First of all. You can run Ghost with MariaDB now??
Officially, no. Here’s the docs:
ALWAYS, in theory. :-) MariaDB was created by the same guy after Oracle bought MySQL from him. He made it as a MySQL drop in replacement, complete with command links, .service
links because… SQL is the language; MySQL, MariaDB, SQLite, PostgreSQL, Microsoft SQL server, and others supposedly all speak the identical language, like Chrome, Firefox, and Safari all interpret HTML, CSS, and JavaScript.
There indeed are some advanced SQL commands that are unique to MariaDB or Microsoft SQL, but not many. Those commands may or may not be considered standard SQL. I have had problems with MySQL that MariaDB fixed. Generally, the SysAdmin guys are moving more toward MariaDB and away from MySQL for reasons like this.
Checking that the server uses MySQL and not MariaDB is like checking that the browser is Chrome and not Firefox. Who does that? If the Ghost team wants to do that, they could, but it wouldn’t make sense.
That said, if the Ghost team said, “only Oracle’s MySQL is officially supported, but other SQL servers may incidentally work,” that be less not making sense, but one could understand it. MariaDB would make more sense where I’m sitting. WordPress is smart because they use pure SQL, so it doesn’t matter anyway. THAT is probably the main reason the world still uses clunky WordPress.
Discussion forked from original location at Multiple Ghost sites with ghost-cli on same server - #11 . Apologies for any discontinuity that may have resulted.
You can read what the Ghost team said about MySQL vs MariaDB and compatibility issues about two years ago: Ghost 5 + MySQL 8, what specific functionality?
Paraphrase: Small team, can’t support multiple databases. Since Ghost uses knex for database access, contributions to knex that maintain and improve knex support for MariaDB would be a good approach for users who want MariaDB compatibility.
…or maybe help the Ghost team be less reliant on jQuery et al and build Vanilla instead. I won’t drive from the back seat, but I am starting to get a picture of a “new feature” colossus stacked on a foundation with no basement.
I recently applied to work for Ghost and answered the question about how to write good software: use Vanilla, build low in the stack, more dependencies = more breaks. Building on too many dependencies steals tomorrow’s progress; you finish today’s sprint quicker, but end up spending more time holding up a crumbling stack than rolling out new features.
At some point, maintaining dependency breaks requires more man hours than the team has; which is when the company itself breaks. In a scenario like that, Ghost either falls or gets bought. I hope the best for this team. They’ve done a lot of good.
They prolly didn’t hire me because I have no Node.js experience , but the notion remains that Ghost values dependency cocktails while I’m like that five-star Italian chef who serves everything raw and speaks a different language from everyone else in the kitchen. The difference between this foreign chef and others is that I don’t hate the wait staff; I like what they are doing on the floor, and I want it to continue.
The use of Knex.js answers most of my questions. I’ll do my best to be a cheer leader and run interference as much as I can as long as I am can. But somehow, I feel like I’m watching the last days of Planet Krypton.
I’m not the only one who thinks MariaDB would have been the more informed decision.
I have been reading this exchange in view of other major deployments, where database selection is key, and MariaDB, with its truly open concept, growing support and user base, plus ever improving scalability are key.
MySQL is not closed source, but dual-licensed, so if you want to scale up, you have to pay. In this regard, all the above comments that are highly critical of the Ghost team’s choice to stick to MySQL are appropriate, future-proof and by no means fallacious!
I will say that use of Knex.js does seem to support pure SQL (SQL engine agnostic), which is good. Kudos on that.
IMO you’re overcomplicating it.
- Ghost uses Knex (and bookshelf, but let’s ignore that for this conversation) instead of writing raw SQL. Knex is relatively agnostic when it comes to SQL backends, allows for parameterized queries, and handles connection pooling. It also does a lot of other stuff.
- In the past, Ghost has supported multiple databases (including PostgreSQL at one point), but the core team doesn’t have the bandwidth/knowledge to maintain support.
- Ghost (Pro) uses MySQL in production. Around the time of Ghost 5.0.0, MySQL 5 was EoL’d, and MySQL 8 is the next version.
- Ghost announced that MySQL 8 will be required for Ghost 5.0.0 to streamline the database support requirements, and reiterated (probably a bit more forcefully) that MariaDB was never officially supported
- MySQL 8 diverged more from MariaDB than MySQL 5
- Some MariaDB users have had issues with Ghost migrations over the past few years after the Ghost 5.0.0 announcement. There’s not just 1 bug in Knex. You can search the Ghost issues page to see the migration issues.
What has simply been said is Ghost’s production stack is designed for MySQL 8. What I’m saying is feel free to try another database, but don’t be surprised if stuff randomly breaks.
That sums it up quite well. I don’t see the overcomplication tho.