5 ms·
What were they using before, and what's wrong with MySQL?
by ihuman 9y ago
What were they using before, and what's wrong with MySQL?
- andrewbarba 9y agoThe original default was actually SQLite3
- jlmn 9y agoPostgres was an option for production along MySQL and SQLite3 was suggested for development instances. Sqlite3 is still supported. The mentioned why they dropped it here: https://dev.ghost.org/dropping-support-for-postgresql/ https://dev.ghost.org/dropping-support-for-postgresql/ > Without active community support, Postgres has always been, and always will be a second-class citizen. For that reason, we are dropping official Postgres support from Ghost core.
- andrewbarba 9y agoThis is incorrect, Postgres was always second class. I know because I tried my best to keep it running on postgres for months, back the 0.5.x days, and it was always a source of frustration.
- seanwilson 9y agoWhat kinds of problems did it have? Why is it so difficult to support MySQL and Postgres at the same time, and why would MySQL be prioritised?
- zimpenfish 9y ago> why would MySQL be prioritised? "Because it's easier to slap a system together on MySQL". Which, to be fair, it is but that's not a good thing when you're talking about data.
- seanwilson 9y agoWhy is it easier though?
- zimpenfish 9y agoBecause it was a lot easier to deal with permissions, you could write "SQL" rather than SQL, it was very lax with SQL keywords as table names (ie. you could create a table called 'user'), replication didn't involve selling your soul to several devils, etc. It's like Rails - it's easy to slap something up but once you start using it in anger, it requires all the handholding and effort.
- e12e 9y agoProbably not that - but Ghost was born in many ways as "a better wordpress" (or a not batshit crazy mess of old code and not properly namespaced plugins and themes). The model it replaces/improves on is self-host on shared-hosting web hosts. That used to be php and mysql - I guess they kept mysql, even if nodejs doesn't lend itself to the same type of shared hosting as php does (in fact, neither does php, but that's a battle for another day). Anyway, many hosting services will throw in a database instance on a more-or-less well-managed mysql cluster - at a minimum there might be some semi-regular backups of the database, with some automation for doing restores (and with more than a bit of luck, they'll keep snapshots, so that the sql injection that wiped your database haven't resulted in all-empty backups by the time you realize). I don't think it makes much sense, but I doubt it is because "postgres is hard, mysql is easy".
- erisds 9y agoI answered this question in as much detail as possible in the blog post I wrote at the time (which was also linked in the above comment) https://dev.ghost.org/dropping-support-for-postgresql/ https://dev.ghost.org/dropping-support-for-postgresql/
- jlmn 9y agoYou're correct. I've edited my comment for clarity.
- zimpenfish 9y ago> what's wrong with MySQL? After many years of security issues and its general inability to be a good database, I refuse to install it on any of my own boxes. If I need something heavyweight, I'll use Postgres; otherwise it'll be SQLite - both of which manage to be more secure and competent than MySQL.
- dna_polymerase 9y ago> inability to be a good database Judging from shitloads of successful companies and projects running MySQL in production I'd argue the inability here is with the developer. Can you substantiate your claim or is your dissatisfaction just rooted in your inability to run a MySQL server?
- vertex-four 9y agoOr... perhaps those companies are just able to paper over MySQL's deficiencies at a lower cost than switching to Postgres with a product that's already in production. MySQL is very, very well-documented to be a poor database engine that does some terrible things with your data without warning. There's several good alternatives - Postgres being free, MS SQL Server being a reasonable paid-for option, and there's Oracle and IBM's database systems at the high end. One of the only reasons to develop a new project for MySQL (assuming your developers are at all capable of writing queries for Postgres, which is hopefully the case) is that you know your deployment environment is going to have MySQL. Which is probably the case here - LAMP is still a popular stack among PHP developers, so there's a very good chance that anyone wanting to deploy Ghost already has a MySQL server.
- neverminder 9y agoRun this query on both MySQL and Postgresql, should explain it all: SELECT 0 = 'banana'
- zimpenfish 9y agoHaving run MySQL servers and suffered the problems for many years before I finally gave up, I don't think it's my inability that's the issue here. As a counterpoint, many successful companies run PHP in production but I don't think anyone would claim that means it's a good language. (One example of where MySQL lack{s,ed}: Postgres with a functional index on a field handled the exact same query on the exact same data a couple of orders of magnitude faster than MySQL on the exact same box.)
- fusiongyro 9y agoThis post from a year or two ago is a pretty good summary of what's wrong with MySQL: https://grimoire.ca/mysql/choose-something-else https://grimoire.ca/mysql/choose-something-else