Postgresql Admin Password

Started by kh4it, May 10, 2015, 03:39:46 AM

Previous topic - Next topic

kh4it

Dear Centos Web Panel,
I try to use postgresql db, when i go to SQL Service => PostgreSQL and i already install package. Then i go phpPgAdmin and login to PostgreSql with my root and password. It's said login disallows for security reason. so what the default username and password?

mrvrmiko

Hello Admins:

About the cuestion, I tried to do since command line, and work well


[root@cwp ~]# su - postgres
-bash-4.1$ createuser usuario
Shall the new role be a superuser? (y/n) yes
-bash-4.1$ createdb testdb
-bash-4.1$ psql
psql (8.4.20)
Type "help" for help.

postgres=# alter user usuariowith encrypted password 'password';
ALTER ROLE
postgres=# grant all privileges on database testdb to usuario;
GRANT
postgres=# \q
-bash-4.1$ exit
logout
[root@cwp ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using cwp.aoi for ServerName
                                                           [  OK  ]
[root@cwp ~]# service postgresql restart
Stopping postgresql service:                               [  OK  ]
Starting postgresql service:                               [  OK  ]

Best regards and make the force with u!