Switch to postgresql acoount

0 votes
How do I switch to PostgreSQL account? So basically, I have two accounts on my ubuntu system. On one of them, I have postgresql installed. How do I switch to that account?
Mar 22, 2019 in Database by Neel
72 views

1 answer to this question.

0 votes

Switch over to the postgres account on your server by typing:

sudo -i -u postgres

You can now access a Postgres prompt immediately by typing:

psql

This will log you into the PostgreSQL prompt, and from here you are free to interact with the database management system right away.

Exit out of the PostgreSQL prompt by typing:

\q
answered Mar 22, 2019 by Kyraa

Related Questions In Database

+1 vote
1 answer

How to migrate a PostgreSQL database into a SQLServer one?

Hello @kartik, The easier way to accomplish this. First ...READ MORE

answered May 13 in Database by Niroj
• 45,080 points
60 views
0 votes
1 answer

Ways to improve query performance using Index hunting

Index hunting help in improving query performance ...READ MORE

answered Aug 29, 2018 in Database by CodingByHeart77
• 3,710 points
330 views
0 votes
1 answer

Why is not preferable to use mysql_* functions in PHP?

The reasons are as follows: The MySQL extension: Does ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,150 points
122 views
0 votes
1 answer

How to do a batch insert in MySQL

You can try out the following query: INSERT ...READ MORE

answered Sep 10, 2018 in Database by Sahiti
• 6,290 points
976 views
0 votes
1 answer

Install postgreSQL on Ubuntu

Installing PostgreSQL on Ubuntu is very simple, ...READ MORE

answered Mar 22, 2019 in Database by Nitesh
138 views
0 votes
1 answer

Access progrs prompt without switching accounts

Use the following to get the postgres prompt ...READ MORE

answered Mar 22, 2019 in Database by Mahi
93 views
0 votes
1 answer

Create new role - postgresql on ubuntu

If you are logged in as the postgres account, ...READ MORE

answered Mar 22, 2019 in Database by Danny
86 views
0 votes
1 answer

Reset a sequence in Oracle

You can try out something like this create ...READ MORE

answered Sep 24, 2018 in Database by DataKing99
• 8,150 points
1,833 views
0 votes
1 answer

What are the prerequisites to install PostgreSQL on Ubuntu?

Before you start installing postgreSQL, make sure ...READ MORE

answered Mar 22, 2019 in Database by Manoj
182 views
0 votes
3 answers

MySQL "Could not create connection to database serve" error

Pls check that you have MySQL server ...READ MORE

answered Jul 3 in Database by anonymous
10,200 views