Both are arguably the most used SQL database. I have been using both for my personal project and in the job. I find it relatively easy to setup and get started with MySQL. PostgreSQL is a bit confusing to me because of its not so easy to remember commands I guess.
Over a decade ago I would have done MySQL. But once Oracle bought MySQL, I decided to step away and use PostgreSQL. I've been delighted ever since and PG just gets better and better. I'm sure I could have dealt with MySQL still, but I've a rather large disdain for Oracle (the company) that I didn't want anything to do with them.
5 years ago I always used MySQL because that's the one I first used and then I just sticked with it.
Lately I have switched to PostgreSQL mainly because of Hasura that creates an instant realtime GraphQL API[1] based on the tables and columns in a PostgreSQL database.
PostgreSQL is also more popular among developers[2].
If you just want a relational database both MySQL and PostgreSQL will work.
If you got a specific requirement then choose base on that.
If you're comfortable with one over the other, don't switch just because unless you want to learn something new.
[1] https://hasura.io
[2] https://insights.stackoverflow.com/survey/2020#technology-most-loved-dreaded-and-wanted-databases-loved4
This comment was deleted 5 years ago