Results 1 to 2 of 2

Thread: Problem to connect to postgres

  1. #1
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    436

    Default Problem to connect to postgres

    i try to use posgresl so i create a new user

    Code:
    CREATE ROLE bob WITH PASSWORD '10add13@';
    Code:
    ALTER ROLE bob WITH SUPERUSER; //to be able to create table maybe not need superuser any suggestion
    \password bob


    Code:
    CREATE DATABASE lcm OWNER bob

    in my pg_hba.conf file

    Code:
    host   lcm             bob     127.0.0.1/32   md5
    local   all             all                                     peer
    i restarted server

    when i tried to connect via jdbc i get
    Cannot establish a connection to jdbcostgresql://localhost:5432/lcm using org.postgresql.Driver (FATAL: role "bob" is not permitted to log in)

    tried also

    Code:
    postgres=# ALTER ROLE bob WITH PASSWORD '10add13@';

    same result
    www.laboiteaprog.com

  2. #2
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    436

    Default Re: Problem to connect to postgres

    same like need to add login ...


    ALTER ROLE "bob" WITH LOGIN;


    just want to know what i need to replace superuser by what?
    www.laboiteaprog.com

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •