Session name from CMD

nickxiro's profile image nickxiro posted 2 years ago in General Permalink

Hello, first of all, big thanks for this awesome tool. I really love it.

Well, after using heidiSQL for many years, now I have a team and a couple of clients to manage, and credentials are quite difficult to keep secure. So we created a small app that send command line:

heidisql.exe -h "host.com" -u "user" -p "1234" -P "3306"

Thats works very well. But I have just one thing that I cannot control and is the "session name" or the name that is shown in the window. In the window is just the host. For example, if i'm connected to the session of "Clients\Company A", the heidi window says "Clients\Company A\Database". But when I connect through CMD, it says "host.com\Database".

Is there any way to change that name? Because I have multiple clients that the host is just an IP and is difficult to follow if we have multiple windows open.

I saw a topic from 16 years ago with an argument like --session but there is not in documentation and doesn't work. And the argument "-d" is for connect to an existing session.

Thanks in advance, Nicolas.

nickxiro's profile image nickxiro posted 2 years ago Permalink

I was checking github, and found the exact thing that I need and is mark as closed and done.

Issue #1295

But I cannot find the answer to use it. If you can help me, would be awesome.

ansgar's profile image ansgar posted 2 years ago Permalink

With the latest Heidi version you should be able to store session parameters using the "--description" parameter.

nickxiro's profile image nickxiro posted 2 years ago Permalink

Hi Ansgar, thanks for your quickly answer.

I don't want to store the session. Anyways, using "--description" store the session but with the host name and not with the argument that I sent.

nickxiro's profile image nickxiro posted 2 years ago Permalink

Reading the code base, it gets the host as session name when there is not "-d" argument. I'm using this as tester and doesn't work.

"C:\Program Files\HeidiSQL\heidisql.exe" -d="localtest" -h="127.0.0.1" -u="root" -p="123456"

ansgar's profile image ansgar posted 2 years ago Permalink

I'm not sure what you are expecting to get. For me this works like expected:

heidisql.exe -d="testabc" -hlocalhost -uroot

It opens a connection to "localhost" with the username "root", and stores the session with the name/description "testabc".

nickxiro's profile image nickxiro posted 2 years ago Permalink

I'm doing "C:\Program Files\HeidiSQL\heidisql.exe" -d="testabc" -hlocalhost -uroot -p1234 and the window name says "localhost" and the session that stored is "localhost" instead of "testabc".

I want to put my custom name in the windows name.

nickxiro's profile image nickxiro posted 2 years ago Permalink

Nevermin. I had version 11.2. I updated and is working. Thank you!

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