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.

Connection from Local Network

AppMan's profile image AppMan posted 3 months ago in Creating a connection Permalink

Hi:

Newbie questions about logging in from local network.

Environment: Windows Server 2012R2, MySql 8.0, Heidi 10.3

User setup in HeidiSQL: User: AppName, From Host: 192.168.% , Password: AppPW, Global Privilages: select & insert checked [username/password worked fine when connecting from local host]

Python Connection string host: 192.168.0.65, port=3306, user=AppName, password=AppPW, db = dbName [The test script that I run connects when the user is setup to connect from the local host]

Test script fails when connection from 192.168.0.65

Is the above setup correct or am I missing something?

Will the Heidi settings persist after the MySQL service is stopped and restarted?

Cheers

ansgar's profile image ansgar posted 3 months ago Permalink

I suppose with "Heidi settings" you mean what you entered into the user manager:

Description

These settings are stored on the server immediately after pressing the "Save" button.

You say your Python connection connects to "192.168.0.65", and it fails when you connect from "192.168.0.65". So I suppose you run HeidiSQL on the machine where the MySQL server is also running. You should try out to set the user account's "From host" setting to "%", or "127.0.0.1", not "192.168.%".

AppMan's profile image AppMan posted 3 months ago Permalink

I may have misstated. I did two tests using the User Manager and my login script.

First, I setup the user to connect from local host in HeidiSQL User Manager. I then ran my connection script on the local host. It connected successfully using host 127.0.0.1.

Second, I setup the user to connect from 192.168.% in the HeidiSQL User Manager as shown in the screen shot you provided. I then ran the connection script on workstation 192.168.0.65. The connection failed on 192.168.0.65

The App that I'm coding needs to be able to connect to the MySQL server from any workstation on the network. Isn't that the purpose of the "192.168.%" setting. Is using the "%" setting wise from a security perspective?

ansgar's profile image ansgar posted 3 months ago Permalink

Yes, that "%" only can open security issues.

However, maybe the connection fails to something else - what does the error message say?

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.