To be a bit more specific, I am currently running a Django project on an Ubuntu EC2 instance in AWS. So far, there hasn't been much of an issue starting the server there. In the case of the MySQL workbench, I also managed to connect it to my Django project but only locally through my Visual Studio Code editor. Because of that, I've been trying to find a way on connecting the MySQL workbench app to my Django object on an AWS EC2 instance.
Just in case, I installed mysql-server and created a user to establish a new MySQL connection. However, I had to do it in an unsafe way, which is updating the mysqld.cnf file and changing the bind-address and mysqlx-bind-address to 0.0.0.0, as show here.
For my settings.py file, I added this for the DB connection:
DATABASES = {'default': {'ENGINE': 'django.db.backends.mysql','NAME': 'db_schema_name','USER': 'username','PASSWORD': 'password','HOST': 'IPv4_of_my_instance','PORT': '3306'}
I also added an inbound rule to my EC2 instance to allow MySQL/Aurora access from any address. After some time, I managed to connect the ubuntu instance in AWS to the newly created MySQL connection. However, since I know this was an unsafe way of doing it, I tried doing the other way, which is going with SSH. This is what is shown for me:
Even as I entered all the necessary information there, it gives me an error that I failed to connect to it, and I want to fix this issue. I'm not sure if maybe it has to do with the SSH Key File, which I tried to create it from the Network and Security section, giving it an RSA key type and .pem format. This is my first time doing this so I hope this clears up my problem a bit more.