Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8684855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:24:44+00:00 2026-06-12T22:24:44+00:00

I am not getting a clue to: simply login to postgreSQL Create a database

  • 0

I am not getting a clue to:

  1. simply login to postgreSQL
  2. Create a database
  3. Add a table
  4. Insert a record
  5. Delete , update etc

These things are normally very very easy using mysql . Can someone help me setup following alternative for postgresql

a) Reset default password — Very Clean description ,
I do not find same level of clarity for PostgreSQL
(Any documentation link is highly appreciated)

b) We know the superuser for mysql is “root” what is the same for PostgreSQL

c) from command line how to ( PostgreSQL ones ?):

 mysql -uroot -proot  
   create database testdb; 
   use testdb;
   create table test(id int(11) auto_increment, name varchar(20), primary key(id));
   insert into test(name) values("testing one"),("testing two"),("testing three"),("testing four");
   select * from test;
   update test set name=concat(name,now()) where id =3;
   delete from test where id =4;
   drop table if exists test;
   drop database if exists testdb;

EDIT MAC OS
# Default password reset

sudo mate /Library/PostgreSQL/9.2/data/pg_hba.conf

replaced (md5 with trust)

# "local" is for Unix domain socket connections only
local   all             all                                     md5
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5

with

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust

save

executed the Reload Configuration.app

 login to postgresql without password : 
  $ psql -U postgres
  postgres# ALTER USER postgres WITH PASSWORD 'new password';
  \q  

-revert back all the changes in pg_hba.conf (replace trust with md5) and save

-reload configuration

Now I can login to postgresql with new password

psql -U postgres

Password for user postgres:[my new password]

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:24:46+00:00Added an answer on June 12, 2026 at 10:24 pm

    To login:

    psql -d postgres_dbname -U postgres
    

    Create Database:

    create database  testuser;
    
    \c testuser;  /*use testuse as mysql*/
    

    Create Table:

    create table employee (Name char(20));
    

    Insert :

     insert into employee VALUES ('XAS');
    

    Update Link

    Delete Link

    Reset Password : See Here &
    See Here Too

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm simply not getting this to work. I saw that this network isn't for
I am getting the following error. Not getting clue why is it happening. Also
The question may be very basic but I am not getting clue anyways ...
Really simple but just not getting it. I want to reference a view by
I'm not getting any anti-aliasing when using drawing GL_TRIANGLE_FANs with this code: glDisable(GL_DEPTH_TEST); //
I am not getting that how to differentiate same element name for eg City,Area
I am not getting any error message in browser due to curly brace missing
I'm not getting the syntax right. Lets say I have this... #include <set> ...
My serializable class is not getting read in with objectinputstream after adding static methods
Hey im not getting anywhere with turning wcf into a restful service. So I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.