Unable to run Strapi on initial setup - Connection Refused Error on MySQL 9.0

Error on Strapi :

Error: connect ECONNREFUSED 127.0.0.1:3306 | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16)

Error caused by mysql_native_password Legacy Authentication of MySQL Plugin

mysql_native_password had been removed on MySQL 9 now.
any replacement to resolve MySQL 9 make connection to Strapi?

Official Announcement on MySQL 9 as link below
https://dev.mysql.com/doc/relnotes/mysql/9.0/en/news-9-0-0.html

Required System information

Screenshot 2024-08-09 at 09 46 33
Screenshot 2024-08-09 at 09 46 54

  • Node.js version: v20.15.1
  • NPM version: 10.8.2
  • Database: MySQL 9.0.1
  • Operating system: MacOS Latest Updated
  • Is your project Javascript or Typescript: Javascript

Screenshot 2024-08-09 at 11 54 48

This topic has been created from a Discord post (1271324189894115440) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

daft question probably, but does the database exist in MySQL? I know that a similar error tripped me up in PG the first time I ran Strapi, the database isnt created if not existing

Strapi hasn’t support MySQL 9 yet. I resolved this issue by reinstall latest of MySQL 8.

ahhh … im a PG user

What is the mean of PG? I can’t get it.

Oh ok… This post is about MySQL 9. Anyways thank you for your replies.