question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Amazon RDS (MySQL) won't connect

See original GitHub issue

prisma/prisma#2791 Bug description

When running migrate:save and migrate:up I get the following error with an Amazon RDS MySQL database:

$ npx prisma migrate save --experimental
Error: P1001: Can't reach database server at `<endpoint>`:`3306`

Please make sure your database server is running at `<endpoint>`:`3306`.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Here is the relevant part from my schema.prisma file:

generator client {
  provider = "prisma-client-js"
}

datasource mysql {
  provider = "mysql"
  url      = "mysql://username:password@endpoint:port/database"
}

How to reproduce

  • Create a MySQL database with Amazon RDS
  • Set “public accessibility” to “Yes”
  • Note the endpoint (server address), DB name, master user name and password for master user
  • Add to schema.prisma as I have above

Expected behavior

Successful migration

Prisma information

Given above.

Environment & setup

  • OS: MacOS
  • Database: MySQL
  • Prisma version: prisma/1.34.10 (darwin-x64) node-v12.16.3
  • Node.js version: v12.16.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
joneslloydcommented, Feb 25, 2021

Hi all – Sorry I haven’t used this for a long time. Please feel free to close.

1reaction
pantharshit00commented, Dec 17, 2020

I tried out RDS and it worked fine, I will wait for the original poster’s response now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting for Amazon RDS - AWS Documentation
When you can't connect to a DB instance, the following are common causes: Inbound rules – The access rules enforced by your local...
Read more >
AWS: can't connect to RDS database from my machine
Go to EC2 Dashboard · Go to Security Groups tab · Select and only select the RDS database security group. You'll see the...
Read more >
Can't connect to AWS RDS instance - How to fix - Bobcares
1. Ensuring that the DB instance is in an available state · 2. Ensuring that inbound rules for the security group allow connections...
Read more >
Can't connect to Amazon RDS MySQL - Server Fault
The DB instance was created using the default port of 3306, and your company has firewall rules blocking connections to that port from...
Read more >
AWS Error 2003 - Can't Connect to RDS MySQL Server
Solution to the AWS 2003 Error · Go to your MySQL RDS page. · Click on the security group, rds-launch-wizard-1 (sg-xxxxx) of type...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found