zedd0
zedd0

Reputation: 31

Can't reconnect to database on MySQL Workbench

I recently set up an AWS RDS MySQL instance. I installed MySQL Workbench on my M1 Macbook, successfully connected with my credentials and started working away. The next day, I found that I was no longer connected to the database server, and upon trying to reconnect with the saved credentials - I found that I couldn't.

Unable to connect to localhost

I check the credentials about 8 times, I check the AWS Console to see if everythings okay (status is "Available"). I ended up having to delete my AWS RDS instance, uninstall workbench, and restart everything before it finally worked. I did some more work on this new database.

The next day, I found that the same thing had occurred - I was disconnected from the database server on MySQL workbench, and I could not reconnect.

Why does this keep happening? Please help, as I can't find anything about it on other stackoverflow threads.

Upvotes: 1

Views: 384

Answers (1)

zedd0
zedd0

Reputation: 31

I seem to have solved it! I just needed to add my IP address to the AWS RDS instance's "inbound rules", so that it allows traffic coming from me. That step was not described in the documentation here: https://aws.amazon.com/premiumsupport/knowledge-center/connect-rds-mysql-workbench/.

I also noticed that you have the option to allow all traffic to your database, but I figured that would probably pose some kind of security risk so I didn't do it (but perhaps not, since you still need the credentials and endpoint to access it..?).

Upvotes: 1

Related Questions