4 ms·
I'm not a DBA, and it could very well be that it's because I'm coming from the LAMP world, but when I need something light and simple, MySQL or MariaDB fit the
by greenhouse_gas 9y ago
I'm not a DBA, and it could very well be that it's because I'm coming from the LAMP world, but when I need something light and simple, MySQL or MariaDB fit the bill a lot more than Postgres.
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.
- youseecomrade 9y agoSounds like Postgres could use some initiative to make the experience easier/faster for beginners and new deployments (if popularity is something valuable for them). That's what many people value in MySQL apart from the familiarity. 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.
- marcosdumay 9y agoInstall Postgres; `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.
- mgkimsal 9y agoCREATE USER X IDENTIFIED BY PASSWORD 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.
- ptman 8y ago\help CREATE USER \help CREATE DATABASE