Connecting to MySQL DB on AWS EC2 instance

I am trying to connect Knime to my DB.
Its a MySQL db on AWS EC2 instance.

I done the following.

  1. Setup a user, at the database level.
  2. Identify the ip address of my ec2 instance.
  3. started the mysql service
  4. Allowed access to the instance via the fire wall.

jdbc:mysql://N.NNN.NN.NN:3306/DBName

It appears, I haven’t done one of the steps correctly or I don’t know if these are the only steps to be carried out. Does any one have experience with this? Can you help?

It turns out that in my MySQL db, I had multiple instances of the same user id but with several different associated host names. Due to this, it may be that Knime or the DB was getting confused. It wasn’t able to latch on to the correct userid and hostname combination.

I removed all the host names except the one that I was using and the connection started working!

To secure the connection, at the EC2 instance level too, I created security group rule which opened the instance only to my IP address.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.