postgresql - How to connect a particular user and create database using PostgresSQL and ubuntu -


i need help. need create databse inside using prticular username , import .sql file using postgressql , ubuntu.i have created 1 user using below command.

sudo -u postgres createuser user1 -s 

i need command create 1 database spesh under particular owner , import spesh.sql it. please me.

create db spesh owner user1

sudo -u postgres createdb "spesh" -o user1 

import sql dump spesh database

sudo -u postgres psql spesh < 'file_path.sql' 

Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -