denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
94.57k stars 5.25k forks source link

mysql2 won't work with Planetscale SSL connection #19194

Closed predetermined closed 2 months ago

predetermined commented 1 year ago

Using npm:mysql2/promise with Planetscale options (SSL enabled) makes the execute function hang in Deno while it works fine in Node.js. I haven't yet tested whether this is Planetscale-specific, or a general problem using the SSL option.

Reproduction repo: https://github.com/gr7d/deno-mysql2-test

GitHub Actions run that shows how it works in Node.js, but times out in Deno: https://github.com/gr7d/deno-mysql2-test/actions/runs/5023471562/jobs/9008101689

The connection string looks like this: mysql://<USER>:<PASSWORD>@amm23wv2h5zo.eu-west-3.psdb.cloud/<DATABASE>?ssl={"rejectUnauthorized":true}

bartlomieju commented 1 year ago

Does this problem persist on Deno v1.34?

predetermined commented 1 year ago

@bartlomieju yes

TehShrike commented 9 months ago

I'm able to connect to a PlanetScale database as of Deno v1.39.0 (when #21441 landed). I'm not able to connect to PlanetScale in the Deno Deploy environment yet.

satyarohith commented 2 months ago

mysql2 library with Planetscale works on both CLI and Deno Deploy (eg https://dash.deno.com/playground/quick-ape-17)