一、使用pgloader进行迁移
1. 安装pgloader:
sudo apt-get install pgloader
2. 使用pgloader迁移数据:
pgloader mysql://username:password@localhost/source_db postgresql://username:password@localhost/destination_db
Q、异常解析
- Q1
KABOOM!
FATAL error: Failed to connect to pgsql at "..." (port 5432) as user "postgres": 10 fell through ECASE expression. Wanted one of (0 2 3 4 5 6 7 8).
An unhandled error condition has been signalled:
Failed to connect to pgsql at ".xx.xx.xx" (port 5432) as user "postgres": 10 fell through ECASE expression. Wanted one of (0 2 3 4 5 6 7 8).
What I am doing here?
Failed to connect to pgsql at "xx.xx.xx.xx" (port 5432) as user "postgres": 10 fell through ECASE expression. Wanted one of (0 2 3 4 5 6 7 8).
- A1
删除postgres密码,使用无密码模式