Search Suggest

Bài đăng

Instal Postgesql database in Ubuntu

Instal Postgress package
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
 

Set a password for the postgres user
sudo -u postgres psql

ALTER USER postgres PASSWORD 'password_here';

update Postgres to use this password. To do this we need to edit the pg_hba.conf file.

vim /etc/postgresql/9.5/main/pg_hba.conf
/opt/accessibility-tool/QWCAT-WEB-UI/qwcatweb/node_modules/react-scripts/scripts/start.js
local   all             postgres                                peer
to
local   all             postgres                                md5

Restart postgresql service
sudo service postgresql restart

Login to database
sudo -u postgres psql
or,
psql -U postgres

create database dbname;
\l
\q

Đăng nhận xét