Inactivity Timeout

lotiara's profile image lotiara posted 1 year ago in Feature discussion Permalink

Hi ansgar,

is there any way to disconnect all the DB after x minutes of inactivity ?

By that I mean a total disconection with passord reintroduction, some times Heidisql keeps running ( I forget to disconnect for any reason) and i would like to force the user to relogin (i dont store passwords) if the timeout minutes have passed.

Thanks

ansgar's profile image ansgar posted 1 year ago Permalink

No, there is no built-in setting for such a timeout. You could use a batch file which auto-exits HeidiSQL after a specific time, but that's not necessarily inactive time:

start "c:\program files\HeidiSQL\heidisql.exe"
timeout /t 60
taskkill /im heidisql.exe /f

Oh wait. I think at least for MySQL/MariaDB, we almost have it without external tools:

  • disable automatic pings in your HeidiSQL session, on the Advanced tab (set to "0")
  • activate "Prompt for credentials"
  • let the server disconnect the sessions after whatever the interactive_timeout variable is set to (default is 28800s = 8h, you can change that in the servers my.ini file)

Now, after 8h of connection inactivity, HeidiSQL reconnects you automatically. This is even automatic when you have the "Prompt for credentials" active. I would change this behaviour for future builds if you say that would be useful?

lotiara's profile image lotiara posted 1 year ago Permalink

Yeah, angar that shoud do the trick The think is that more than once i let the session opened in a client computer, i will set to 1H, I think thats mor than enought if you are in fromt of the PC.

ansgar's profile image ansgar posted 1 year ago Permalink

Done in the next build.

Refer to issue #2172 for more comments / discussion.

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