Strapi and Database connectivity issue

System Information
  • Strapi Version: 3.6.8
  • Operating System: This is containerized using base image, node:14-alpine
  • Database: MySQL
  • Node Version: >=10.16.0 <=14.x.x
  • NPM Version: ^6.0.0
  • Yarn Version: ^1.22.19

This is the issue I’m having. If you could help me out on this that would be best.
note: I’ve checked the DB credentials and they are the correct ones.

error Error: connect ETIMEDOUT
at Connection._handleConnectTimeout (/srv/app/node_modules/mysql/lib/Connection.js:409:13)
at Object.onceWrapper (events.js:519:28)
at Socket.emit (events.js:400:28)
at Socket._onTimeout (net.js:495:8)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)

Thanks.