by thewhitetulip · 10y ago · 0 comments
* If I wanted to make Postgres listen on non-localhost, modify listen_addresses in postgresql.conf.
* Add database access controls as required in pg_hba.conf. The comments in the file are illuminating, but one can examine [0] for more information. [1]
* Create a database with appropriate permissions, along with a user. [2]
* Start Postgres.
I remember having to do the equivalent of all of those things every time I had to install MySQL. :)
What -exactly- did you successfully do, what -exactly- did you fail to do? Divulging that information will help guide assistance efforts. :)
[0] http://www.postgresql.org/docs/9.4/static/auth-pg-hba-conf.h...
[1] For example, the following line would allow password-based access from IPv4 localhost by the user "user" to the database "database":
host database user 127.0.0.1/32 md5
[2] http://www.postgresql.org/docs/9.4/static/sql-createdatabase... for CREATE DATABASE syntax (or you can use createdb http://www.postgresql.org/docs/9.4/static/app-createdb.html ) http://www.postgresql.org/docs/9.4/static/sql-createrole.htm... for CREATE ROLE syntax (or you can use http://www.postgresql.org/docs/9.4/static/app-createuser.htm... ) http://www.postgresql.org/docs/9.4/static/sql-grant.html for GRANT syntax.I use elementary OS and all I did was sudo apt-get install postgres
I have no idea what it installed and what it didn't, in the entire process never once it asked me for a password and while connecting to the database it says that invalid password and I can't reset password without connecting to the database!! May I know your email ID? so I'll try to install it once and tell you how it goes.
As of now I have everything installed plus the graphical client with the elephant logo, but I just have no idea what the password is
It's also in most distro and bsd repos.
For the benefits of PostgreSQL over MySQL it is definitely worth learning.
Other things are just confusing to newcomers (eg. different meanings of the term "database" between MySQL and Postgres, or understanding schemas and search_path).
I find that to be the easiest way to get up and running with it.
I got all the help from this thread and the above link!