step 1:yum install postgresql-server postgresql-contrib
step 2: postgresql-setup initdb
step 3:systemctl start postgresql
step 4:In Linux by default, a user named postgres is created once PostgreSQL is installed.
passwd postgres --->. change the password
step 5:Now change to postegresql client
psql postgres
step 6:createdb testDB ( You can create a new testdb)
step 7:createuser samplerole –pwprompt ( create a sample role)
step 8:createdb testDB -O samplerole (assign the role to the database)
step 9:To connect to new database use
psql testdb
step 10:to drop a database use
dropdb testdb
step 2: postgresql-setup initdb
step 3:systemctl start postgresql
step 4:In Linux by default, a user named postgres is created once PostgreSQL is installed.
passwd postgres --->. change the password
step 5:Now change to postegresql client
psql postgres
step 6:createdb testDB ( You can create a new testdb)
step 7:createuser samplerole –pwprompt ( create a sample role)
step 8:createdb testDB -O samplerole (assign the role to the database)
step 9:To connect to new database use
psql testdb
step 10:to drop a database use
dropdb testdb
Comments
Post a Comment