deno
deno copied to clipboard
mysql2 won't work with Planetscale SSL connection
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}
Does this problem persist on Deno v1.34?
@bartlomieju yes
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.
mysql2 library with Planetscale works on both CLI and Deno Deploy (eg https://dash.deno.com/playground/quick-ape-17)