Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

import sql single table dump in postgres

# If you have already created DB then don't need to follow 1st step:-

# STEP=1

# open terminal then run following commands to create postgres database and user:-

sudo -u postgres psql

postgres=# create database mydb;

postgres=# create user myuser with encrypted password 'mypass';

postgres=# grant all privileges on database mydb to myuser;

# STEP=2

# c used for selecting your database.

postgres=# c yourdatabasename

# i used for importing dump data in database.

yourdatabasename=# i path_of_your_dump_file for example:-

yourdatabasename=# i /home/developer/projects/django_projects/db_dump.sql

# If you face this type of error when you importing data:-

# ERROR:  role "yourusername" does not exist

# so you can make superuser to your "db_user/yourusername" using this command:-

postgres=# ALTER USER fusion WITH SUPERUSER;

ALTER ROLE
Comment

PREVIOUS NEXT
Code Example
Shell :: search by service terminal 
Shell :: Katie Leung 
Shell :: All matches were filtered out by modular filtering for argument 
Shell :: ngxcountup 
Shell :: react lorem ipsum 
Shell :: git merge theirs 
Shell :: linux file size 
Shell :: npm install discord.js 
Shell :: bash return position of matching string 
Shell :: angular cli install ubuntu 
Shell :: make a commit with past date 
Shell :: nano with line numbers 
Shell :: linux batch resize jpg 
Shell :: install jq windows 
Shell :: github see the username 
Shell :: ArgumentError: Malformed version number string 0.32+git 
Shell :: how to find maven home in linux 
Shell :: rpm fusion repo install fedora 
Shell :: kumaran km github 
Shell :: improve ubuntu 16.04 performance 
Shell :: powershell get empty folders 
Shell :: Upgrading/ updating dart sdk 
Shell :: wsl docker System has not been booted with systemd as init system 
Shell :: alpine linux /bin/sh: node: not found 
Shell :: git pull in all repositories 
Shell :: youtube dl download playlist by index 
Shell :: bash generate random number between 1 10 
Shell :: how to run xmrig on ubuntu 
Shell :: github action run shell script 
Shell :: installing zsh oh my zsh wsl 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =