0
votes

I am trying to deploy rds instance with MySQL engine using rds. The database subnet group is in public subnet.

I have performed the following checks: - The security group is allowed public access on port 3306 - Telnet command successfully on endpoint URL on 3306 port

Configuration as below:

RDS configuration

Security group: RDS security group

Logging details:

anhs-MBP:mykeys anhtrang$ telnet database-1.c9nddsynmhxo.us-east-2.rds.amazonaws.com 3306
Trying 3.130.77.228...
Connected to ec2-3-130-77-228.us-east-2.compute.amazonaws.com.
Escape character is '^]'.
N
5.7.22-log
*!qV/yIp1Blwamysql_native_password

Trying to connect to rds using console

enter image description here

2
You have a space between the host and the port in the URL field (.com :3306)Paul
@Paulpro removed space, same issue. Connection to dev-mysql-rds failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.Joey Trang
It is best not to allow access to the RDS instance from 0.0.0.0/0. Either specify the IP address of the machine on the internet that needs access, or if that is dynamic, create an EC2 instance and specify that instance's security group as the Source to allow. Also, although you hid the instance name in the first screenshot, you forgot to do that for all the others. (Although it would have been very difficult to guess there was a space in there if you had hidden it 😂)Wodin
@Wodin this is just for test and learning, quick setup only. In production, its definitely serious security concern and anti security practicesJoey Trang
@JoeyTrang I don't know what software that is. Do you get any more info by clicking on Troubleshooting?Wodin

2 Answers

0
votes

This is due to the problem with MySql driver plugin of InteliJ

I am able to connect to rds instance using mysqlsh commandline tool. enter image description here

0
votes

Since MySQL Server 8.0.11 caching_sha2_password is used as default authentication method. Probably IntelliJ MySQL driver do not support this authentication method. You need to create user with one of the older authentication method, e.g. CREATE USER xyz@localhost IDENTIFIED WITH mysql_native_password BY 'passw0rd'.

More here https://dev.mysql.com/doc/refman/8.0/en/create-user.html and here https://dev.mysql.com/doc/refman/8.0/en/authentication-plugins.html