LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-13-2019, 01:15 PM   #1
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1-15 RH 6.2/7, RHEL 6.5 SuSE 8.2/11.1, Debian 10.5
Posts: 516

Rep: Reputation: 32
Installed Postgresql 10 from Slackbuilds on 14.2 and can't login to database


I followed the steps on slack build and installed Postgresql using the user and group Postgres with no password and now struggling to login to database.

Database is running but can't connect.

Do I need to give the user Postgres a password first? Actually tried changing it and it can't be changed apparently.

Thanks inn advance
 
Old 11-13-2019, 05:13 PM   #2
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
What does "can't connect" mean? Please detail.
Have you got your database storage(cluster) initialized with initdb?
I'd suggest to always switch to user postgres for maintenance (even connecting) on console - use: su - postgres
If you want to connect to the db as a different user, use: psql -U postgres postgres
(given the default db is called postgres)

Here's a short version of the "RTFM":
https://www.postgresql.org/docs/11/install-short.html
 
Old 11-14-2019, 02:27 AM   #3
teoberi
Member
 
Registered: Jan 2018
Location: Romania
Distribution: Slackware64-current (servers)/Windows 11/Ubuntu (workstations)
Posts: 619

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
The latest version of Postgresql is 12.0
https://www.postgresql.org/download/

@abga the short version of RTFM is OK just instead of "make" I use "gmake -j2"
 
Old 11-14-2019, 02:53 AM   #4
TurboBlaze
Member
 
Registered: Jan 2018
Location: Russian Federation, Lipetsk region, Dankov
Distribution: Porteus
Posts: 196

Rep: Reputation: Disabled
If look at https://www.postgresql.org/developer/roadmap/ today is must out PostgreSQL 12.1

plisken, if need you can read my howto (in Russian)
Code:
forum.porteus.org/viewtopic.php?f=54&t=7137
 
Old 11-14-2019, 12:48 PM   #5
IlyaK
Member
 
Registered: Jun 2017
Location: The Netherlands
Distribution: Debian
Posts: 118

Rep: Reputation: 72
* Go to your cluster dir (``/var/lib/pgsql/10.2/data`` for postgres installed from slackbuilds)
* Open ``pg_hda.conf``
* add the following line ``local postgres postgres trust``
* restart posgres ``/etc/rc.d/rc.postgresql restart``
* connect ``$ sudo -u postgres psql``
* set password: ``# \password``
* remove line you added to ``pg_hda.conf``
* restart posgres ``/etc/rc.d/rc.postgresql restart``
* connect using password

Last edited by IlyaK; 11-14-2019 at 12:49 PM.
 
Old 11-15-2019, 12:29 AM   #6
TurboBlaze
Member
 
Registered: Jan 2018
Location: Russian Federation, Lipetsk region, Dankov
Distribution: Porteus
Posts: 196

Rep: Reputation: Disabled
PostgreSQL 12.1 · 2019-11-14
https://www.postgresql.org/docs/12/release-12-1.html
 
Old 11-15-2019, 05:19 AM   #7
IlyaK
Member
 
Registered: Jun 2017
Location: The Netherlands
Distribution: Debian
Posts: 118

Rep: Reputation: 72
What is the reason to use 12 if slackbuilds contain 10?
 
Old 11-15-2019, 06:51 AM   #8
TurboBlaze
Member
 
Registered: Jan 2018
Location: Russian Federation, Lipetsk region, Dankov
Distribution: Porteus
Posts: 196

Rep: Reputation: Disabled
IlyaK, it's your choice what is use.
I prefer a new opportunities and stability.
The databases should be updated, and not stand still.
 
Old 11-17-2019, 02:16 PM   #9
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1-15 RH 6.2/7, RHEL 6.5 SuSE 8.2/11.1, Debian 10.5
Posts: 516

Original Poster
Rep: Reputation: 32
My bad, apologies...

Seems like I was in such a rush to test one thing that I forgot that I had actually set a password during compile or install.

Anyway, all fine, achieved what I set out to, database imported with;

psql dbname < backup.sql

It was the password being requested by the above command that had me stumped, but as I say, I forgot I had actually set it.

Thanks for all replies and interest...
 
Old 11-18-2019, 04:03 PM   #10
mishehu
Member
 
Registered: Aug 2014
Location: USA
Distribution: Slackware (where ::1 is), Centos, Debian
Posts: 106

Rep: Reputation: 158Reputation: 158
As a point of clarification - what is listed in SBo isn't to be taken as somehow an endorsed version per say. While the maintainer of that SBo may in fact endorse a specific version of a software package, that doesn't necessarily mean it's the most preferred option out there. The only thing that can be reliably ascertained is "this is a specific combination that is known to work."

In the case of Postgresql, I would say that 10 is a bit old at this point, and I made a trivial change (I think it was just the version number) to build the 11 series. I generally follow a project's most recent stable release, so I'll jump to Postgresql 12 soon as well. You can offer changes back to the SBo project if you think that the scripts for building that software are outdated. (Recommended that you first contact the script maintainer directly, however.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Difference Between PostgreSQL And MySQL And How To Migrate From MySQL To PostgreSQL LXer Syndicated Linux News 0 05-27-2017 08:26 PM
[SOLVED] Slackbuilds - upgrading postgresql from 8.4 to 9.1.1 Sum1 Slackware 8 12-10-2011 12:52 PM
Database Programming (database to database transaction) johncsl82 Programming 7 02-02-2007 08:20 AM
Use SlackBuilds.org or my own hosting to offer up SlackBuilds? hollywoodb Slackware 6 11-30-2006 08:56 PM
postgresql -odbc & postgresql-jdbc installation kjsubbu Linux - Software 0 06-19-2003 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration