'AWS RDS Switch Network Ports

I need to switch the port of my current AWS DB, which was originally connected at port 3306. I have another service that needs to be connected to 3306, but it will not run if the port has multiple connections (ie. the AWS DB).

Through the AWS console, I changed the security groups to allow inbound connections from port 3309, and the DB is shown to be at port 3309 on there as well, great. When I run the command nc -zv <DB-instance-enpoint> <port number>, it tells me the connection to the port 3309 was successful, and errors when I run it on the port I want to switch out of.

Yet, when I run the command sudo lsof -i:3309, nothing shows up. I run sudo lsof -i:3306 (old port), and my db process (and the other service) is listed on there. These seem to be conflicting pieces of information-- clearly it seems a connection was made with the DB, so why is the old port still active with the DB process and the new port is not displaying the connection? How do I properly switch the port from 3306 to 3309?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source