Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Kmail2 - I have not given up ... yet
Date: Thu, 31 Dec 2015 15:28:49
Message-Id: 22690760.o0CkEzBbFg@andromeda
In Reply to: Re: [gentoo-user] Kmail2 - I have not given up ... yet by Mick
1 On Thursday, December 31, 2015 01:50:43 PM Mick wrote:
2 > On Thursday 31 Dec 2015 11:14:48 J. Roeleveld wrote:
3 > > On Wednesday, December 30, 2015 07:30:49 PM Mick wrote:
4 > > > Having been away from postgres for the best part of 7 years now, it is a
5 > > > struggle to find my feet again. As a result I have been chasing my tail
6 > > > on
7 > > > this task today, not making much progress. :-(
8 > >
9 > > I was actually under the impression you had recent experience.
10 > > In this case, I would suggest to use the default, eg. let akonadi handle
11 > > the full database.
12 >
13 > Unfortunately, my world moved over to MySQL and I stopped using postgres.
14 > So, I'm reading the fine manual again, but I find myself asking questions
15 > like ... how do I do this MySQL command on postgres; e.g. on MySQL I set
16 > up a mysql root user passwd before I do anything else. Isn't this the case
17 > with postgres?
18
19 Not really.
20 The following is based on the default when using Postgresql on Gentoo.
21
22 When following the post-inst steps emerge tells you, the database is
23 initialised to run as "postgres".
24 It also auto-creates a "postgres" user in the database. This user has full
25 privileges.
26 I only use that user to create additional users and databases. No other user,
27 on my installations, has permissions to add users/databases.
28 Usually I do give them full permissions within the databases.
29
30 > Or,
31 >
32 > On MySQL I create a new user and grant him privileges on a database and then
33 > that user can login and run whatever calls I have allowed on the database.
34 > With postgres I got this '"FATAL: role "michael" is not permitted to log
35 > in' error. :-/
36
37 You need to specifically allow a user to login.
38 You need to create a "michael" user inside postgresql, before you can login
39 locally using that user.
40
41 > > > This is my akonadiserverrc at the moment:
42 > > >
43 > > > [%General]
44 > > > Driver=QPSQL
45 > > > SizeThreshold=4096
46 > > > ExternalPayload=false
47 > > >
48 > > > [QPSQL]
49 > > > Name=akonadidb
50 > > > Host=localhost
51 > > > User=postgres
52 > > > Password=
53 > > > Options=
54 > > > ServerPath=/usr/bin/pg_ctl
55 > > > InitDbPath=/usr/bin/initdb
56 > > > StartServer=false
57 > > > Port=5432
58 > >
59 > > Yipes!
60 > >
61 > :-)
62 > :
63 > > Seriously, unless you know what you are doing, let akonadi do it itself.
64 > > Stop akonadi, wipe the files, and restart akonadi.
65 > >
66 > > Eg. run de database embedded.
67 >
68 > With the above set up using the default 'postgres' user, without a passwd,
69 > akonadi is able to connect to the database and do its thing.
70 >
71 > After some initial hickups with Kmail2 being too clever for it is own good
72 > (there was some clash with akonadi resources of sorts, it could detect
73 > another local mailer, etc.) I managed to configure two new IMAP4 accounts
74 > and I am now using them quite successfully! :-)
75 >
76 > Initial impressions (have not rebooted yet) is that this migration was much
77 > less fraught with problems compared to previous attempts. I'll wait to see
78 > how stable it will prove in daily usage.
79 >
80 > Thank's again Joost for your kind help to get kmail2 going! :-)
81 >
82 > PS. Would any postgresql gurus know why I can't login with some arbitrary
83 > name/passwd in the postgres database?
84
85 Yes :)
86
87 But this is a bit OT for this thread, so keeping it brief:
88
89 1) The createuser and createdb commands I posted are to be run as the
90 "postgres" user.
91 2) The user you create needs to be allowed to connect
92 (/etc/postgresql-???/pg_hba.conf )
93
94
95 --
96 Joost

Replies

Subject Author
Re: [gentoo-user] Kmail2 - I have not given up ... yet Mick <michaelkintzios@×××××.com>