distal-attribute
distal-attribute
distal-attribute
distal-attribute

Bug? Try to log into AWS host, keeps opening my localhost DB

zewtastic posted 7 months ago in General
I recently installed MySQL locally. Now whenever I try and connect to my AWS host MySQL DB using SSH tunnel, HeidiSQL simply connects to the MySQL DB on my local machine.

Nothing seems to stop it from doing that.

So weird. Any ideas?
ansgar posted 7 months ago
I rewrote the whole SSH tunnel logic a few days ago. Please update to the latest build if not already done and try again.
zewtastic posted 7 months ago
I was on a 7x version. After the issue arose I updated to the latest. Still did not fix the issue. unhappy
zewtastic posted 7 months ago
I am currently on 8.3.0.4749, and only one session created, which is the one with ssh tunnel to my aws host.

Still simply connects to my localhost. unhappy
zewtastic posted 7 months ago
Tried making a brand new session for the ssh tunnel to aws, and still same result, connects to localhost.
ansgar posted 7 months ago
Ok. Did you perhaps enter "localhost" into the "SSH host" on the ssh tunnel tab?
zewtastic posted 7 months ago
Heh no, I checked that first of course.

I have been using the connection for over a year, so that session had not changed. Only change came after I added the local MySQL install.

And I created a new session. The SSH tunnel host is definitely going to my AWS elastic IP.
ansgar posted 7 months ago
And you're passing a SSL certificate? As far as I know Amazon requires that. See issue #2336 for postings from other users which can connect to AWS.
zewtastic posted 7 months ago
So I am running Win7, went into service and stopped MySQL.

Now HeidiSQL will connect normally to my DBs on my AWS host.
zewtastic posted 7 months ago
Yeah, so weird.

If I start my Local version of MySQL 5.6 up, Heidi goes right back to connecting to localhost.

It's like it first looks at localhost, before starting the SSH Tunnel, and if it gets a localhost connection it stops before trying the SSH tunnel first.

just a guess, nothing else but based on what it seems to be doing.
ansgar posted 7 months ago
Do you use the port 3306 as "Local port" in HeidiSQL's SSH tunnel tab? If so, your local MySQL server also runs on 3306 and gets precedence when you run it, while plink.exe does not "overwrite" it. You should use a different local port in Heidi's local port, let's say 3307.
zewtastic posted 7 months ago
port 3307 is used on the SSH tunnel tab.
zewtastic posted 7 months ago
zewtastic posted 7 months ago
But both DBs, on the remote host and local have the same root pw. Thus why they can both open from one session configuration.
ansgar posted 7 months ago
Yes, the same password explains why your connection is not refused on localhost, but it does not explain why you're routed to localhost instead of the specified ssh host. To be honest, I have no clue. You could try to run the plink command by hand and see if that fails:

C:\whatever\plink.exe -ssh yourusername@ec2-54-243 -pw "yourpassword" -N -L 3307:ec2-54-243:3306

mPolr posted 7 months ago
Same problem here. I have two connections to different servers (via SSH, with different passwords). If i connected to one server, and try connect to other, i got same tables:



But if i disconnect from first server and connect to other, all right:



Seems like SSH tunnel settings don't load if connection already estabilished.

Please login to leave a reply, or register at first.