dimitri / pgloader

Migrate to PostgreSQL in a single command!
http://pgloader.io
Other
5.45k stars 548 forks source link

URL paramter options=endpoint not working #1536

Open maxbec opened 1 year ago

maxbec commented 1 year ago
pgloader -d "mysql://[user]:[password]@[host]:[port]/db" "postgres://default:[password]@ep-morning-disk-[id].eu-central-1.postgres.vercel-storage.com:5432/[dbname]?options=endpoint%3Dep-morning-disk-[id]&sslmode=require"
2023-10-23T02:18:19.008822-04:00 FATAL Failed to parse "postgres://default:[password]@ep-morning-disk-[id].eu-central-1.postgres.vercel-storage.com:5432/[dbname]?options=endpoint%3Dep-morning-disk-[id]&sslmode=require" as a PostgreSQL database URI.

It seems like the options URI argument ist not supported. But neon.tech databases require it. Any idea how to fix this?

joshstrange commented 10 months ago

@maxbec Were you able to figure this out and/or use a different tool?

tddschn commented 8 months ago

I'm also having issue with Neon postgres using the connection string provided by the Neon Console.

dlbnco commented 8 months ago

Put the endpoint in the password field instead, followed by ;:

pgloader -d "mysql://[user]:[password]@[host]:[port]/db" "postgres://default:endpoint=ep-morning-disk-[id];[password]@ep-morning-disk-[id].eu-central-1.postgres.vercel-storage.com:5432/[dbname]?sslmode=require"

If you get a parsing error because of the ;, try creating a config file and doing pgloader file.load.

Source: https://neon.tech/docs/import/migrate-mysql#retrieve-your-neon-database-connection-string