2. WordPress.
3. If you need something simple and basic, MySQL is much easier to get up and running.
2. WordPress.
3. If you need something simple and basic, MySQL is much easier to get up and running.
Don’t get me wrong, I prefer Postgres generally too, but I can definitely see wins to MySQL on ease-of-use. Especially the less standard but more forgiving SQL syntax and simple DESCRIBE commands. Yes the quirks add up for MySQL but Postgres has its share of quirks too.
In MySQL there are five steps: Install MySQL (creating root user at the same time), CREATE DATABASE X, USE DATABASE X, CREATE table Y, work.
If I need something more secure, I'll add a "Create User"/add permissions step in there.
For some reason, step 2-4 (create user and set up database/table) give me a headache in Postgres.
I rarely come across tutorials for beginners where MySQL isn't treated like the only option, even if only by omission. I wouldn't be surprised if students only found out about the viability of different databases after a few years.
`su postgres` or whatever user it uses;
run `psql`;
`CREATE USER X IDENTIFIED BY PASSWORD;`
`CREATE DATABASE X OWNER X;'
Now X can connect there and add tables as he wishes.
Postgres onboarding coule be better, but it is naive to choose a tool you will use for years based on the first 5 minutes experience.
Googled that and not one result on the first page mentioned PostgreSQL. I don't think this approach is a common one at all. More to the point, I'm not sure i've ever seen that set of instructions anywhere, ever, for pgsql. Every tutorial and intro focuses on running 'createuser'.
Oh, yeah, and you'll need to be root to go in and futz with your pg_hba.conf file, then have permissions to write it out and restart the server (probably as root).
This 'createuser' approach hasn't been a '5 minute experience' - it's been the approach that is promoted as the default answer/approach almost everywhere I've ever looked for several years.
\help CREATE USER
\help CREATE DATABASE