| > ...I was somehow able to connect to the psql database... Yeah? For posterity, mind detailing how did you do it? > HN these days is full of elitist people who think the people who are struggling with things are downright dumb... No. That's not what happened. You said: > I have never been able to actually download install and use [Postgresql] ... unfortunately it isn't as simple as installing mysql[.] Everyone who has installed both MySql and and Postgres know that you need to do exactly the same things [0] -albeit in slightly different ways to get started from scratch. Initial configuration of MySql and Postgres is equally complicated. [1] This makes your comment look like an anti-Postgres slam. Cynical people might suspect that your original comment was the time-tested "Man, thing X sucks, can't do Y, and is completely useless!" Internet tech-support bait, but that ain't me, baby. Over the years, I've found great profit in assuming that most widely-used non-B2B software [2] is actually generally well designed and thought-out, and that any inability to do a thing is a result of my lack of understanding or familiarity rather than poor or difficult design of the software. Why? Because, -frankly- such failures are pretty much always a result of my lack of understanding. [0] Configure listen IP, create a superuser account, set database access permissions, create a database, start the daemon. [1] That is, (compared to writing software that uses SQL) not complicated at all, and just as complicated as configuring any other non-trivial daemon. [2] And some B2B software, too. |
I did a sudo -u suraj createdb mydb
It said that role suraj didn't exist, then I realized that postgres was using my own username, I didn't touch a single config file! In a remarkable sense of irony, postgres is so amazing that while installation mysql needs us to give a password, postgres uses this user concept and for each database you have to create a new user so there is no one password to rule them all.
$ sudo -u suraj psql
I was just trying to do
$ psql
then it was saying that the role suraj didn't exist
so I did sudo -u postgres createuser --superuser $USER
then it said that role suraj exists, then it said database suraj didn't exist
sudo -u suraj createdb amarokdb;
then it created the db
then
I connected the db using the usual format