this post was submitted on 20 Jun 2023
7 points (100.0% liked)

Lemmy

12514 readers
23 users here now

Everything about Lemmy; bugs, gripes, praises, and advocacy.

For discussion about the lemmy.ml instance, go to [email protected].

founded 4 years ago
MODERATORS
 

cross-posted from: https://lemmy.ml/post/1374138

I'm thinking about setting up my own (bare metal) Lemmy instance to play around with it, but it seems to require PostgreSQL. Everything else on my system uses MySQL, and I don't really want to run 2 separate database services. I guess I would also be fine with using an SQLite file, but that's not ideal.

Has anyone managed to set up a Lemmy instance with MySQL instead of PostgreSQL? Are you aware of any PostgreSQL to MySQL or SQLite compatibility layers?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 1 year ago (1 children)

Lemmy is implemented in Rust using the Diesel ORM/Query Builder for persistence. I don't know enough rust to comment specifically, but based on my knowledge of other ORMs and stuff it should be possible to support different database backends, but it would likely not "just work" without some effort on the part of the developers.

One of the things that is being done for the next release is a bunch of pg optimization work, which to me makes it even less likely for it to work with minimal changes, as they are likely putting in some amount of postgres-specific code to achieve those gains.

[–] [email protected] 0 points 1 year ago (1 children)

Diesel supports mysql/Maria but meanwhile lemmy itself assumes it will be psql & I agree that changing that esp after 0.18 would be a silly idea. Changing it to support clickhouse or bigtable/c*/dynamo also a silly idea but maybe more worthwhile than mysql.

[–] [email protected] 1 points 1 year ago

I personally would love to see Cockroach support, as that is still a dialect of pg but often takes some work to get running right/well/at all.