PostgreSQL – Create User, Create Database, Grant privileges/access.

Let’s assume that you’ve already have PostgreSQL installed on your Ubuntu machine and that you want to create a user, create a database and grant the user privileges to write/read to/from the database. The following steps should cover that: 1. Switch to postgres user sudo su postgres 2. Enter the the interactive terminal for working with Postgres […]

Read More

Postgresql Basic Select,Insert,Update,Delete Command

POSTGRESQL connect db, list database, show tables, select, update, delete, begin ve commit komutları aşağıdaki gibi kullanılmaktadır. virtualm:~$ su – postgres postgres@virtualm:~$ psql postgres=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges ————-+———-+———-+————+————+———————– postgres | postgres | UTF8 | en_US.utf8 | en_US.utf8 | template0 | postgres | […]

Read More

Ubuntu Versiyonlarına PostgreSQL 9.6 nasıl yüklenir?

You need to add the latest PostgreSQL repository for the latest version. sudo add-apt-repository “deb https://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main” Update and Install PostgreSQL 9.6: sudo apt-get updatesudo apt-get install postgresql-9.6 Default postgres super user and postgres database is created. You need to set a password for the postgres super user. ubuntu@:~$ sudo passwd postgres Enter new […]

Read More

Postgresql için 15 pratik DBA Komutu

  1. How to change PostgreSQL root user password ? $ /usr/local/pgsql/bin/psql postgres postgresPassword: (oldpassword)# ALTER USER postgres WITH PASSWORD ‘tmppassword’;$ /usr/local/pgsql/bin/psql postgres postgresPassword: (tmppassword) Changing the password for a normal postgres user is similar as changing the password of the root user. Root user can change the password of any user, and the normal […]

Read More