2010-12-05 8 views
0

나는 1mb의 SQL을 가지고 pg_dump으로 버려진 것처럼 보인다.이 1MB의 SQL 덤프를 복원하는 방법?

-- 
-- PostgreSQL database dump 
-- 

SET client_encoding = 'UTF8'; 
SET standard_conforming_strings = off; 
SET check_function_bodies = false; 
SET client_min_messages = warning; 
SET escape_string_warning = off; 

SET search_path = public, pg_catalog; 

SET default_tablespace = ''; 

SET default_with_oids = false; 

-- 
-- Name: app_address; Type: TABLE; Schema: public; Owner: me; Tablespace: 
-- 

CREATE TABLE app_address (

... 

이제 복원하려고한다. The docs say 사용할 수 있습니다.

psql dbname < infile 

사용할 수 있습니다.하지만

psql: FATAL: no pg_hba.conf entry for host "[local]", user "me", database "mydb", SSL off 

왜 그게? 이 오류를 수정하려면 어떻게합니까?

답변

5

나는 내가 이름을 제공하지 않는 한 SQL 덤프를 복원 할 수없는 것을 경험을 rountinely, 그래서 시도 : 데이터베이스에 액세스 할 수 있습니다, 그래서 당신은있는 pg_hba.conf를 구성해야

psql -U <username> <database> < <infile> 
+0

후저를! 아름다워, 고마워. – mpen

+0

@ 랄프 :이 답변을 수락 된 답변으로 표시해 주셔서 고맙습니다. ;) –

+0

사실, 나는 그럴 수 없었다. 너는 너무 빨리 대답했다. – mpen

0

.

트릭 (내 생각)해야 위해서는 pg_hba.conf이 라인을 추가 :

host all    all    localhost    trust 
관련 문제