Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

database - How to connect MySQL Workbench to Amazon RDS?

I am accessing the Amazon RDS (MySQL) from Putty. MySQL Workbench works through SSH commandline only, but I would like to access the cloud MySQL host database directly from MySQL Workbench.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This solution worked for me: Add your IP to the Security Group rules as follows. Assuming you have logged into AWS:

  1. Go to RDS -> Databases -> Select your database

enter image description here

  1. Make sure the Public Accessibility value is Yes enter image description here

  2. Check your IP address using http://checkip.amazonaws.com/. If it is not added to the Security Rule Groups, you should add it. this step is crucial

3.1. Click on the rule name. This will open up a new tab, then click in the name of the rule.

enter image description here

3.2. Click on Edit inbound rules

enter image description here

3.3. Click on Add new rule, and add a rule with the following values:

Type: MYSQL/Aurora.

Protocol: TCP (default)

Port range: 3306 (default)

Source: My IP -> This will be the IP Address you got at http://checkip.amazonaws.com/.

enter image description here

  1. Fill information in MySQL Workbench

enter image description here

Hostname: Use the value you have for Endpoint at Connectivity and Security

Port: Use the value you have for Port at Connectivity and Security, by default it is 3306.

Username: Use the value you have for master username at Configuration

Password: Use the value you set when you created the database instance.

If you forgot the password, you can change it by clicking on Modify in your database instance or if you're using AWS Elastic Beanstalk or so you can SSH into the instance and run the command

/opt/elasticbeanstalk/bin/get-config environment

and you'll find that information in it.

enter image description here enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...