Stop using MySQL in 2026, it is not true open source (optimizedbyotto.com)
from otto@programming.dev to selfhosted@lemmy.world on 11 Jan 10:43
https://programming.dev/post/43869104

#selfhosted

threaded - newest

MrSoup@lemmy.zip on 11 Jan 10:56 next collapse

MariaDB >>>

I’ve been using it since ever on my rpi because they say it’s easier on resources

YurkshireLad@lemmy.ca on 11 Jan 12:20 collapse

Who are “they”?

We use MariaDB at work but I don’t know why it was originally chosen over PostgreSQL, as that was before my time.

MrSoup@lemmy.zip on 12 Jan 10:11 collapse

Blogs and forums back then when I looked it up.
Can’t remember exactly where (since it’s been a long time ago), but I’m sure more than someone claimed it.

schnurrito@discuss.tchncs.de on 11 Jan 10:58 next collapse

Are there real advantages to using either MySQL or MariaDB instead of PostgreSQL?

illusionist@lemmy.zip on 11 Jan 11:06 next collapse

Depends on the task but for general usage there is no big difference. You would choose one over the other if you need one for work.

roguelazer@lemmy.world on 11 Jan 11:55 next collapse

MySQL often has moderately higher performance (particularly for workloads where you want your data clustered by PK, which is how InnoDB is natively structured) and its replication system is much more flexible than either of PostgreSQL’s. I like Percona personally, but MariaDB is fine too.

msage@programming.dev on 12 Jan 00:31 collapse

Is it true?

Postgres with correct fillfactor, it doesn’t create new pages and works very fast.

Replication in MySQL always sucked ass, only received synchronous replication in some new edition, and that also didn’t sound great.

Postgres has logstream and logical replication, both of them can be set to various levels of synchronicity, and logical replication is configurable at least as well as MySQL is in terms of which data is sent.

jubilationtcornpone@sh.itjust.works on 11 Jan 12:16 next collapse

No. But there are a number of advantages of using PostgreSQL over the others.

Rikj000@discuss.tchncs.de on 11 Jan 12:26 next collapse

Yeah,
I did a speed test comparison between Oracle MySQL and MariaDB MySQL,
MariaDB is about 10 times faster.

FYI: When Oracle bought MySQL a lot of developers left and created MariaDB, so the brains behind the project moved, and in the meantime Oracle did a great job of fucking things up.

schnurrito@discuss.tchncs.de on 11 Jan 12:27 collapse

That’s not what I asked. I asked about a comparison of both of them to PostgreSQL.

Rikj000@discuss.tchncs.de on 11 Jan 12:33 collapse

Oh misread my bad,
not much experience with PostgreSQL

kumi@feddit.online on 11 Jan 16:49 next collapse

Operating and securing Postgres is a steeper learning curve. MariaDB is more forgiving for best-effort shoestring setups without compensating scalability for it.

As a dev I’m agnostic, as an owner and computer scientiest I prefer Postgres, as a sysadmin or *Ops I will put my hand up for MariaDB any day if I’ll be on call or maintain deployments.

msage@programming.dev on 12 Jan 04:04 collapse

Is Maria that much better than MySQL?

Cause that one is absolute shit, very difficult to maintain, and requires lots of config changes and even replicas can disconnect when something’s not 100% ok.

I will take Postgres over any other DB any day of the week.

0x0@lemmy.zip on 12 Jan 04:38 collapse

Is Maria that much better than MySQL?

MariaDB is MySQL’s fork, initiated by the main developers, so…

msage@programming.dev on 12 Jan 06:04 collapse

Does that mean it’s still an utter borderline unusable shit?

0x0@lemmy.zip on 12 Jan 06:10 collapse

I’d say ti’s a little bit better.

Wispy2891@lemmy.world on 11 Jan 22:11 next collapse

Maybe that once every 2 years when you upgrade to major version it does it automatically? You save 15 mins every 2 years?

0_o7@lemmy.dbzer0.com on 11 Jan 23:01 collapse

If you’re constrained by resources (CPU/RAM).

There’s a reason most web hosts usually have mariadb and not postgres.

Grandwolf319@sh.itjust.works on 11 Jan 11:05 next collapse

But but but, it has the word “my” in it

/s

folekaule@lemmy.world on 11 Jan 11:37 collapse

Both MySQL and MariaDb are named after the developer’s daughters.

ianhclark510@lemmy.blahaj.zone on 11 Jan 11:59 next collapse

Apache Phoenix: allow me to introduce myself

AnUnusualRelic@lemmy.world on 11 Jan 15:45 collapse

Who?

ianhclark510@lemmy.blahaj.zone on 12 Jan 09:17 collapse

Apache Phoenix

AnUnusualRelic@lemmy.world on 13 Jan 05:36 collapse

Looks great for my blog!

JoMiran@lemmy.ml on 11 Jan 11:59 next collapse

MySQL belongs to Oracle. That’s literally all you need to.know in order to avoid it.

<img alt="" src="https://lemmy.ml/pictrs/image/6c2e9a1f-ecfc-4d02-9441-f653dde9e95a.jpeg">

[deleted] on 11 Jan 12:52 next collapse

.

non_burglar@lemmy.world on 11 Jan 13:19 next collapse

When they bought Sun, they:

  • killed Solaris, effectively
  • tried to kill zfs too
  • nearly killed mysql with licensing audits
  • became borderline evil with licensing practices
  • acted like complete assholes in court, holding up cases for years
AnUnusualRelic@lemmy.world on 11 Jan 15:36 next collapse

Sun was such a useful contributor to the ecosystem and they fucking trashed absolutely everything. It’s a miracle that so much stuff could be saved.

0x0@lemmy.zip on 12 Jan 04:31 collapse

Oracle triggered a fork bomb.

dukatos@lemmy.zip on 12 Jan 02:23 collapse

You forgot what they did to Java, plus they sued Google for using Java API.

hexmasteen@lemmy.ml on 16 Jan 18:07 collapse

and OpenOffice and VirtualBox

iturnedintoanewt@lemmy.world on 11 Jan 13:21 next collapse

reddit.com/…/whats_with_the_stigma_behind_oracle/

Psythik@lemmy.world on 11 Jan 13:25 collapse

Oh so it’s a greed thing, but not quite a Nestlé level of evil thing, then. Meh.

partofthevoice@lemmy.zip on 11 Jan 13:53 next collapse

You clearly haven’t tried using one of there services APIs.

azertyfun@sh.itjust.works on 11 Jan 16:29 collapse

I mean, Nestlé killed hundreds of thousands in impoverished countries. I think the Oracle service APIs can’t be that bad, though I’m sure they would be if it made Larry Ellison $50.

0x0@lemmy.zip on 12 Jan 04:34 collapse

Can you elaborate on Nestlé?
I know they’re shit and avoid anything Nes* but am unaware of actual data.

badgermurphy@lemmy.world on 12 Jan 05:07 collapse

They ware widely regarded as among the most villainous companies in history along with DeBeers and the East India Trading Company. Among their more infamous crimes against humanity include bribing the leaders of developing nations to sign over water rights to aquifers their people are using, which they take completely for bottling, destroying the local ecosystem and population. When the malnourished mothers can’t produce milk to feed their babies, they say things like “use our baby formula instead then, which is much healthier than natural milk”. If there’s not already a Behind he Bastards on them, someone could make a whole podcast just on their villainy.

frongt@lemmy.zip on 11 Jan 16:50 collapse

Only due to lack of capability, not desire.

fizzle@quokk.au on 11 Jan 13:23 next collapse

I don’t know the actual reason, but I personally get a bad vibe every time I see the logo because usually it means I’m trying to install or fix some java bullshit, which never goes well.

0x0@lemmy.zip on 12 Jan 04:35 collapse

Here’s a few.

JoMiran@lemmy.ml on 11 Jan 13:34 next collapse

Hatred of Oracle predates “cancelling” by decades. Oracle is and has always been one of, if not the most disgusting and vicious companies in tech. They kill everything they touch.

If you need a political component, then Oracle = Larry Ellison, but Oracle hate predates and supercedes the American political slide into fascism.

s38b35M5@lemmy.world on 11 Jan 15:21 collapse

I was at a party about fifteen years ago. A guy introduced himself and we gabbed for a few minutes. Then he asked what I do for work (IT sysadmin at the time) and I told him and asked the same. He said he was in sales for a tech company. I asked which one, and he stepped close and whispered, “Oracle.” I could see he was prepared for me to bring the hate. He saved himself when he told me he was actually leaving for a gig at Dell. Later, I learned from the host that he made that part about leaving up because he felt bad. I later learned he went to work for Nutanix. Poor guy hated his own employer, and it was obvious.

JoMiran@lemmy.ml on 11 Jan 15:27 collapse

Nutanix…oof. I deal with them every day. It isn’t their fault their shit can’t handle what we do, but it is their sales folk that constantly lie and misrepresent.

Wanna know one of rhe big reasons people hate Oracle so much? It’s their sales guys. They are awful. If that guy went from Oracle to Nutanix, that tells me that I cannot trust a single syllable out of their mouth.

s38b35M5@lemmy.world on 11 Jan 15:33 next collapse

Lol! I’m glad you picked on that. I won’t badmouth them, but the user experience does that for them. That guy from the party must hate himself, haha

frongt@lemmy.zip on 11 Jan 16:49 next collapse

Sales? No, their sales department is second to their legal department in hate.

0x0@lemmy.zip on 12 Jan 04:30 collapse

their sales folk that constantly lie and misrepresent.

So… your average sales folk?

forrgott@lemmy.zip on 11 Jan 14:52 next collapse

Why would you keep track? Can’t form your own opinions?!

And what the fuck hasn’t Oracle done? Like, seriously, they’ve been a known bad actor for literally decades now…

Psythik@lemmy.world on 11 Jan 15:59 collapse

I’m sorry I don’t follow this company’s actions as closely as you do. I can’t even remember the last time I used Oracle-branded software. (Unless you count MySQL, which I’ve never had an issue with. It just works.)

jubilationtcornpone@sh.itjust.works on 11 Jan 14:54 next collapse

“Lets use Oracle DB for that.”

Statements made by the utterly deranged.

0x0@lemmy.zip on 12 Jan 04:29 next collapse

The hell did Oracle do?

Have you been living under a rock? Think 2010 for starters…

Auli@lemmy.ca on 13 Jan 06:53 collapse

People have hated Oracle for decades.

FlowerFan@piefed.blahaj.zone on 11 Jan 12:54 next collapse

how did the joke go? “one rich asshole called larry ellison”?

ijhoo@lemmy.ml on 11 Jan 23:48 collapse

what’s the joke part?

slazer2au@lemmy.world on 12 Jan 01:43 collapse

It spells Oracle.

anomnom@sh.itjust.works on 11 Jan 17:22 collapse

Isn’t that the point of Postgresql. It’s basically an open source version of MySQL.

I’m sure there are some proprietary nonsense that MySQL has, but I’ve never needed it in 17 years

sobchak@programming.dev on 11 Jan 18:14 next collapse

Postgres is basically an open source version of Oracle DB. Much more featureful than MySQL. I believe Oracle bought MySQL just to kill it.

msage@programming.dev on 12 Jan 00:21 collapse

MySQL always sucked ass.

PostgreSQL went in a different direction, started with best support of the SQL standard, then optimized everything to make it fast.

Postgres has/had the best SQL standard support out of every server, open-source or not.

MySQL was at the other end, only started catching up after Oracle bought it.

Eyekaytee@aussie.zone on 11 Jan 22:04 next collapse

afaik MariaDB is the open source version of MySQL

Jajcus@sh.itjust.works on 12 Jan 03:18 next collapse

That is an insult to PostgreSQL. PostgreSQL was fully featured relational database even before it implemented SQL. It started much earlier tha MySQL.

And MySQL didn’t have proper transactions or data integrity constraints (including foreign keys) for long time, while calling itself an ‘SQL database’.

anomnom@sh.itjust.works on 12 Jan 05:02 collapse

Thank you, I never had time to read up on its history when I was busy smashing out sites on stupid deadlines with constant last minute changes and morons for project managers.

Auli@lemmy.ca on 13 Jan 06:52 collapse

MariaDB

slacktoid@lemmy.ml on 11 Jan 12:45 next collapse

Stop using mysql, you have postgres.

possiblylinux127@lemmy.zip on 11 Jan 13:22 collapse

And mariaSQL

call_me_xale@lemmy.zip on 11 Jan 13:29 next collapse

Hell, even SQLite is good enough for most small projects.

dan@upvote.au on 11 Jan 13:58 collapse

SQLite is underrated. I’ve used it for high traffic systems with no issues. If your system has a large number of readers and a small number of writers, it performs very well. It’s not as good for high-concurrency write-heavy use cases, but that’s not common (most apps read far more than they write).

My use case was a DB that was created during the build process, then read on every page load.

derpgon@programming.dev on 11 Jan 18:03 collapse

Wow, I never thought about storing build data in an SQLite file. That’s quite clever.

dan@upvote.au on 11 Jan 18:35 collapse

One of SQLite’s recommended use cases is as an alternate to proprietary binary formats: sqlite.org/appfileformat.html. Programs often store data in binary files for performance, but you get a lot of the same functionality included with SQLite (fast random access, concurrent usage, atomicity, updates that don’t need to rewrite the whole file, etc) without having to implement a file format yourself.

I’m not sure if this is still the case, but Facebook’a HHVM used to store the compiled bytecode for the whole site in a single SQLite database: docs.hhvm.com/docs/hhvm/…/repo-authoritative/. Every pageload loaded the bytecode for all required files from the DB.

hoppolito@mander.xyz on 12 Jan 03:37 next collapse

Fascinating read, I should definitely also make way more use of sqlite for little side projects.
Thanks for the link!

0x0@lemmy.zip on 12 Jan 04:36 collapse

They also have a (one-time fee) encryption extension.

immobile7801@piefed.social on 11 Jan 16:49 collapse

FWIW mariadb was bought by a private equity firm in 2024

psoul@lemmy.world on 11 Jan 18:10 next collapse

Oh no… it was the easy solution for Wordpress and other plug and play self hosted services .

alibloke@feddit.uk on 11 Jan 23:33 collapse

The corporation was bought by k1 capital. The foundation and therefore the open source version will always be free

fizzle@quokk.au on 11 Jan 13:19 next collapse

I didn’t know this was ever in question?

Also stop calling it “my sequel”

TrickDacy@lemmy.world on 11 Jan 14:21 collapse

stop calling it “my sequel”

Why?

frongt@lemmy.zip on 11 Jan 16:51 collapse

Sequel is Microsoft. S-Q-L is Linux.

surewhynotlem@lemmy.world on 11 Jan 17:59 collapse

Microsoft’s is “squeal”. Like a pig. When you get the bill.

possiblylinux127@lemmy.zip on 11 Jan 13:23 next collapse

That’s why I moved to MSSQL

/s

dan@upvote.au on 11 Jan 13:56 next collapse

MariaDB is not always a drop-in replacement. There’s several features that MySQL has that MariaDB doesn’t, especially related to the optimizer (for some types of queries, MySQL will give you a more optimized execution plan compared to MariaDB). It’s also missing some newer data types, like JSON (which indexes the individual fields in JSON objects to make filtering on them more efficient).

MariaDB and MySQL are both fine. Even though MySQL doesn’t receive as much development any more, it doesn’t really need it. It works fine. If you want a better database system, switch to PostgreSQL, not MariaDB.

melfie@lemy.lol on 11 Jan 16:10 next collapse

Oracle sees itself as an activist organization, one whose goal is the advancement of the Israeli colonization project. Safra Catz, the company’s Israeli-American CEO, bluntly explained that any employees uncomfortable with supporting a genocide should simply quit. “We are not flexible regarding our mission, and our commitment to Israel is second to none” (source)

Hmm, MySQL or PostgreSQL—how will we ever decide which one to pick.

skisnow@lemmy.ca on 12 Jan 03:32 collapse

wow, I didn’t need any more reasons not to support Oracle but thanks anyway

GreenKnight23@lemmy.world on 11 Jan 17:19 next collapse

<img alt="wank bank" src="https://64.media.tumblr.com/tumblr_me2fxfuxa51r9jgh1o2_250.gif">

tacosanonymous@mander.xyz on 11 Jan 18:00 collapse

Dude. You never finish.

BrilliantantTurd4361@sh.itjust.works on 11 Jan 18:03 next collapse

Why would anyone ever choose mysql over postgres?

Scrollone@feddit.it on 11 Jan 23:52 collapse

MySQL has been the “default” choice for a long time for PHP programmers. I don’t know why.

Evotech@lemmy.world on 11 Jan 23:54 next collapse

LAMP indeed

WhyAUsername_1@lemmy.world on 12 Jan 02:46 collapse

We need LAPP . Stat!

msage@programming.dev on 12 Jan 04:05 next collapse

Tutorials mostly.

whoisearth@lemmy.ca on 12 Jan 04:35 collapse

It used to be free with less of a barrier to entry than postgres

Shimitar@downonthestreet.eu on 11 Jan 21:50 next collapse

If you don’t want to use postgresql for some obscure reason use MariaDB real open source MySQL drop in replacement.

ikidd@lemmy.world on 11 Jan 22:43 next collapse

What rock do you live under if you’re using MySQL over MariaDB?

lechekaflan@lemmy.world on 12 Jan 08:34 collapse

Older people about to return to programming, and most of the online tutorials they have are about 20 years old, having no idea an alternative exists.

800XL@lemmy.world on 11 Jan 23:42 next collapse

What year is this? No one should be using Mysql since MariaDB came about.

androidul@lemmy.world on 11 Jan 23:52 next collapse

when is Oracle gonna go Broadcom mode on MySQL, still waiting for the moment 🍿

herseycokguzelolacak@lemmy.ml on 12 Jan 00:21 next collapse

Didn’t Postgresql effectively win the database wars? Why use anything else?

dogs0n@sh.itjust.works on 12 Jan 02:27 collapse

Postgres or sqlite are the only ones I ever consider nowadays.

Hawk@lemmynsfw.com on 12 Jan 04:22 next collapse

See also duckdb and clickhouse for OLAP of course.

Takios@discuss.tchncs.de on 12 Jan 05:02 collapse

If only the upgrade process wasn’t so annoying with postgres…

msage@programming.dev on 12 Jan 06:05 collapse

What do you mean?

Stop DB, run pg_upgrade, start it, win?

Or set up logical replication into newer version, wait for sync, test use-cases, switch write?

Where do you get better experience?

UnknownMp@lemmy.world on 12 Jan 01:16 next collapse

Perhaps MariaDB is a better choice.

[deleted] on 12 Jan 01:49 collapse

.

0x0@lemmy.zip on 12 Jan 04:26 next collapse

No one should be using MySQL since 2010.

bored_boar_onboard@lemmy.world on 12 Jan 07:21 next collapse

Clearly you can’t use MySQL because it isn’t webscale.

SneakyWeasel@lemmy.ca on 12 Jan 08:27 next collapse

Wamp anyone? (I think thats what its called, im at work and cant check my pc) Or am i the odd one out.

otto@programming.dev on 12 Jan 13:22 collapse

In case you are Czech, there is a translation at root.cz/…/prestante-uz-pouzivat-mysql-neni-to-sku…

Glad to see more translations show up!