Connection Problems to MySQL Database After Upgrading NodeJs Runtime to 16

Overview

After upgrading Node.js runtime version from 12 to 16, there are connection issues from MySQL database via the application.

Reverting this back to Node.js 12 through Tenant Settings > Advanced > Extensibility > Runtime but Node.js 12 is no longer available in the drop-down list.

Applies To

  • MySQL Database
  • Node.js

Cause

Checking Can I require? - Search which node modules you can use in webtask.io , the default version for a require("mysql") call changed from version 2.7.0 in node 12 to 2.18.1. Perhaps there were some subtle changes in the library between these two versions that affected the customer's use-case.

 

Solution

To ensure that they use the same module version across node runtimes, they could change require("mysql") to require("mysql@2.7.0") in their DB scripts.

 

Recommended content

No recommended content found...