On Thursday, December 31, 2015 01:50:43 PM Mick wrote:
> On Thursday 31 Dec 2015 11:14:48 J. Roeleveld wrote:
> > On Wednesday, December 30, 2015 07:30:49 PM Mick wrote:
> > > Having been away from postgres for the best part of 7 years now, it is a
> > > struggle to find my feet again.  As a result I have been chasing my tail
> > > on
> > > this task today, not making much progress.  :-(
> > 
> > I was actually under the impression you had recent experience.
> > In this case, I would suggest to use the default, eg. let akonadi handle
> > the full database.
> 
> Unfortunately, my world moved over to MySQL and I stopped using postgres. 
> So, I'm reading the fine manual again, but I find myself asking questions
> like ... how do I do this MySQL command on postgres;  e.g. on MySQL I set
> up a mysql root user passwd before I do anything else.  Isn't this the case
> with postgres?

Not really.
The following is based on the default when using Postgresql on Gentoo.

When following the post-inst steps emerge tells you, the database is 
initialised to run as "postgres".
It also auto-creates a "postgres" user in the database. This user has full 
privileges.
I only use that user to create additional users and databases. No other user, 
on my installations, has permissions to add users/databases.
Usually I do give them full permissions within the databases.

> Or,
> 
> On MySQL I create a new user and grant him privileges on a database and then
> that user can login and run whatever calls I have allowed on the database.
> With postgres I got this '"FATAL:  role "michael" is not permitted to log
> in' error.  :-/

You need to specifically allow a user to login. 
You need to create a "michael" user inside postgresql, before you can login 
locally using that user.

> > > This is my akonadiserverrc at the moment:
> > > 
> > > [%General]
> > > Driver=QPSQL
> > > SizeThreshold=4096
> > > ExternalPayload=false
> > > 
> > > [QPSQL]
> > > Name=akonadidb
> > > Host=localhost
> > > User=postgres
> > > Password=
> > > Options=
> > > ServerPath=/usr/bin/pg_ctl
> > > InitDbPath=/usr/bin/initdb
> > > StartServer=false
> > > Port=5432
> > 
> > Yipes!
> > 
>  :-)
>  :
> > Seriously, unless you know what you are doing, let akonadi do it itself.
> > Stop akonadi, wipe the files, and restart akonadi.
> > 
> > Eg. run de database embedded.
> 
> With the above set up using the default 'postgres' user, without a passwd,
> akonadi is able to connect to the database and do its thing.
> 
> After some initial hickups with Kmail2 being too clever for it is own good
> (there was some clash with akonadi resources of sorts, it could detect
> another local mailer, etc.) I managed to configure two new IMAP4 accounts
> and I am now using them quite successfully!  :-)
> 
> Initial impressions (have not rebooted yet) is that this migration was much
> less fraught with problems compared to previous attempts.  I'll wait to see
> how stable it will prove in daily usage.
> 
> Thank's again Joost for your kind help to get kmail2 going!  :-)
> 
> PS.  Would any postgresql gurus know why I can't login with some arbitrary
> name/passwd in the postgres database?

Yes :)

But this is a bit OT for this thread, so keeping it brief:

1) The createuser and createdb commands I posted are to be run as the 
"postgres" user.
2) The user you create needs to be allowed to connect 
(/etc/postgresql-???/pg_hba.conf )


--
Joost

Reply via email to