Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Domain resolution showing wrong IP on Windows 11

GuimLe's profile image GuimLe posted 2 months ago in Creating a connection Permalink

Hi,
A friend experience a really strange error I can't reproduce.
She is trying to connect to a custom domain which point to a local (via WSL) IP address in Windows hosts file. On a PowerShell window, if she ping the domain used in Heidi to connect to MariaDB Server, the returned IP is the good one. But when she'is trying to connect via Heidi on this domain, this is not the good IP that is shown on the error.
We've tried to reboot, reinstall, flush DNS cache on Windows but nothing works.
On my computer, it's working like a charm since so many years, I can't reproduce the problem...
Any idea on what we can do to prevent this error ?

ansgar's profile image ansgar posted 2 months ago Permalink

Please post a screenshot or the exact text of that error message.

GuimLe's profile image GuimLe posted 2 months ago Permalink

Hi,
as you can see below, the IP in the error dialog doesn't match the IP returned by the ping command on powershell window :
screenshot1

Of course, the MariaDB server is configured to allow this user to connect, as you can see here on the right side :
screenshot2

Let me know if you need more information.

ansgar's profile image ansgar posted 2 months ago Permalink

That error message shows you the IP of your client in the network, not the one from the server.

Could it be that "ip -4" shows you the IP inside your WSL environment which is different to your Windows host?

GuimLe's profile image GuimLe posted 2 months ago Permalink

Of course it is showing me the client IP, I don't know why I was thinking about something else...

This is not a bug of your app, just one of my brain !

Thank you for your answer, and more important, thank you very much for this really nice app. Most of Windows users don't know how much this app is the best option to manage databases.

ansgar's profile image ansgar posted 2 months ago Permalink

Thanks a lot for your appreciation.

I just wonder if you can connect now?

GuimLe's profile image GuimLe posted 2 months ago Permalink

Of course, we've set up good permissions for this user, not only from host 127.0.0.1 and tada, it works.

When we are connecting from WSL, the domain is translated to 127.0.0.1, this is why connection was working on left side of the second screenshot.

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




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.