我正在使用pgloader将数据库数据从中迁移MySQL
到Postgres
,我根据他们的文档设置了所有内容,但仍然没有导入数据。
ubuntu@ip-123-31-13-119:/applications$ pgloader pgload.load
pgloader 响应:
2020-02-22T06:28:27.676000Z LOG report summary reset
table name read imported errors total time
----------------------- --------- --------- --------- --------------
before load 3 3 0 0.015s
fetch meta data 0 0 0 0.287s
Create Schemas 0 0 0 0.006s
Create SQL Types 0 0 0 0.008s
Create tables 0 0 0 0.000s
Set Table OIDs 0 0 0 0.000s
----------------------- --------- --------- --------- --------------
----------------------- --------- --------- --------- --------------
COPY Threads Completion 8 8 0 0.000s
Index Build Completion 0 0 0 0.000s
Reset Sequences 0 0 0 0.030s
Primary Keys 0 0 0 0.000s
Create Foreign Keys 0 0 0 0.000s
Create Triggers 0 0 0 0.001s
Install Comments 0 0 0 0.000s
当我签入数据库时,它什么也没显示
MD247_development=# select * from users;
ERROR: relation "users" does not exist
LINE 1: select * from users;
^
MD247_development=#
这是加载文件:
LOAD DATABASE
FROM mysql://ubuntu:secure@localhost/MD247_development
INTO postgresql://ubuntu:secure2020@localhost/MD247_development
WITH include drop, create tables, create indexes, reset sequences,
workers = 8, concurrency = 1,
multiple readers per thread, rows per range = 50000,
prefetch rows = 10000
SET PostgreSQL PARAMETERS
maintenance_work_mem to '1024MB',
work_mem to '1024',
search_path to 'md247_development, public, "$user"'
SET MySQL PARAMETERS
net_read_timeout = '220',
net_write_timeout = '220'
including only table names matching 'users,user_requests,search_queries,addresses'
ALTER SCHEMA 'md247_development' RENAME TO 'pagila'
BEFORE LOAD DO
$$ create schema if not exists pagila; $$,
$$ create schema if not exists mv; $$,
$$ alter database MD247_development set search_path to pagila, mv, public; $$;
我不确定问题出在哪里。