Importing database schema in PostgreSQl fails
NickName:user9110842 Ask DateTime:2018-02-18T19:26:35

Importing database schema in PostgreSQl fails

So I want to import a database schema but it fails. PostgreSQL Version is 9.5.11. Maybe the command is outdated? The user "user" is already set up. Do I need to pass a password additionally in the command?

postgres@root:~$ psql -d database -U user -f createdb.sql
psql: FATAL: Peer authentication failed for user "user"

Copyright Notice:Content Author:「user9110842」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/48851111/importing-database-schema-in-postgresql-fails

More about “Importing database schema in PostgreSQl fails” related questions

Importing database schema in PostgreSQl fails

So I want to import a database schema but it fails. PostgreSQL Version is 9.5.11. Maybe the command is outdated? The user "user" is already set up. Do I need to pass a password additionally in the

Show Detail

importing database in dockerized postgresql

I'm trying to import my database schema and data into my docker container with postgresql:9.6. I successfully created my database: docker exec <container> psql -U <user> postgres -l...

Show Detail

How to copy Postgresql database schema to prisma schema

I am using prisma and PostgreSQL. My PostgreSQL database filled with some data. Is it possible to get Postgresql database schema and set it to prisma schema or something? I've tried to prisma db pu...

Show Detail

Automated way to convert a postgresql database to a postgresql schema in a different database?

Is there an automated way to take a postgresql database and convert it into a postgresql schema that can be loaded into a new database? I played around with this and found two ways to do what I wa...

Show Detail

An alternative method for importing .csv to PostgreSQL

I am hosting a Postgres instance locally on my machine, but I have been unsuccessful in importing larger .csv files (1.0 - 1.9 GB) to the database using available methods in the docs and SO. When ...

Show Detail

PostgreSQL: Create schema in specific database [NOT psql]

Im trying to create a SQL file to import my database/schema/tables with PHP. If I use the PgAdmin, it inserts a meta-command \connect after the CREATE TABLE and this generates an error if I run th...

Show Detail

Install Drupal database in specific PostGreSQL schema

I want to install & setup my Drupal databases in a specific schema of the PostgreSQL database. For example, let's say I have created a schema named "test_drupal" in my existing PostGreSQL datab...

Show Detail

Postgresql: table name / schema confusion

I created a table Abc in the public schema of my postgresql database. According to the documentation public should be the default schema. search_path is set to "$user",public as expected. But the

Show Detail

Migrating Data from a MySQL database to a PostgreSQL database with a different schema

I am migrating my site from PHP to Rails. At the same time I want to migrate my database from MySQL to PostgreSQL. However, the schema I have in the MySQL database is poor. Therefore, I want to

Show Detail

How can I export the schema of a database in PostgreSQL?

My computer broke down but fortunately I backed up the folder C:\Program Files\PostgreSQL. Now I'm working in a new computer and I would like to import the previous Postgres databases that are st...

Show Detail