deno icon indicating copy to clipboard operation
deno copied to clipboard

mysql2 won't work with Planetscale SSL connection

Open predetermined opened this issue 1 year ago • 3 comments

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}

predetermined avatar May 19 '23 10:05 predetermined

Does this problem persist on Deno v1.34?

bartlomieju avatar May 26 '23 11:05 bartlomieju

@bartlomieju yes

predetermined avatar May 29 '23 13:05 predetermined

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.

TehShrike avatar Dec 22 '23 21:12 TehShrike

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

satyarohith avatar Jul 18 '24 15:07 satyarohith