Unable to connect to MySQL database on AWS RDS

I am unable to connect to my database. Tried the following methods:

  1. Used mysql2 package Got error saying connection.connect() does not exist. I think workers doesn't support this package.
  2. Used cloudflare-mysql packagehttps://www.npmjs.com/package/cloudflare-mysqlGot error recieved packets in wrong sequence
  3. Used cloudflare docsIt lead to https://github.com/cloudflare/worker-template-mysql.
Followed it and got error FinalizationRegistry does not exist.
npm
A Cloudflare Workers compatible MySQL package based on the MySQL Node package.. Latest version: 0.9.4, last published: 7 months ago. Start using cloudflare-mysql in your project by running npm i cloudflare-mysql. There are no other projects in the npm registry using cloudflare-mysql.
Was this page helpful?