Hi Forum members,
I’m at tutorial on “Creating Migrations” in Next.js part 1.
I tried Test-Connection link in DataGrip with the same steps and config as Mosh did but it failed.
Also, configured MySQL in MySQL-Configurator with ver. 8.1.0
Database url:
DATABASE_URL=“mysql://root:123abc456def%23@localhost:3306/nextapp”
(%23 in the password represents # , special char)
Downloaded the drivers also. Checked drivers version: 8.0.25
Tried with this version as well as Mosh’s: 8.0.1
Failed, with both the versions.
Checked prervious questions. Found no reference.
Referred to docs also but did not find any miss.
==============
Also, run into the error below while using 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`.
================
Dug deep into debugging and ran the command CREATE DATABSE nextapp
on MySQL-Command Line.
Now, at least, I can see the nextapp
database, as below, which was absent earlier.
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| nextapp |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.00 sec)
BUT, still if I run npx prisma migrate dev
, the same error shows up:
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": MySQL database "nextapp" at "127.0.0.1:3306"
Error: P1001: Can't reach database server at `127.0.0.1`:`3306`
Please make sure your database server is running at `127.0.0.1`:`3306`.
It’s so frustrating. Already spent half of the day to fix it.
Can anyone help ?
Sheer waste of one’s limited time.
================
Thank you
Manu