Amazon RDS (MySQL) won't connect
See original GitHub issueprisma/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:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi all – Sorry I haven’t used this for a long time. Please feel free to close.
I tried out RDS and it worked fine, I will wait for the original poster’s response now