I’m frustrated with the error below on running the command: npx prisma migrate dev
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": MySQL database "nextapp" at "localhost:3306"
Error: P1001: Can't reach database server at `localhost`:`3306`
Please make sure your database server is running at `localhost`:`3306`.
I uninstalled and re-installed MySQL and Prisma to re-run the commands step-by-step in case I missed something but still the same error.
First of all, thank you for sparing time to reply on my issue.
I was wondering at zero replies so far from the community
As a Windows user, I had actually used a special software Revo-Uninstaller to find all MySQL files installed deep into the OS and then removed all those while uninstalling MySQL and then re-installed it.
But, I still faced the issue and it’s unresolved so far.
However, I will try to look for a similar repo/forum where anyone explained the uninstall similar to the one that you shared for MacOS.
Maybe, something works out.
I spared full 4 days in thoroughly searching the internet and then exhausted all debug options that ChatGPT asked me to but still this bug is not getting fixed.
So frustrating and big waste of time.
Now, I reached out to Prisma team and hoping something gets worked out. Let’s see.
However, thanks for providing pointers and I’ll retry.
Installing a slightly older version of mysql (8.0.37) worked for me, like they did here Reddit - Dive into anything. The version 8.4.0 LTS doesn’t seem to work properly for me, it keeps turning on and off non stop if you check its status in system settings.
I am not sure if this is the solution to your problem. I have an M2 MAC and my problem was that the mySQL server instance started and stopped 2 seconds later, which is a known problem with mySQL 8.4. You need to unclick the keyring Data File.