I am using Heidi to connect to an SQL database. The connection works since I can connect to the DB.
I need to know the connection string.
Where can I find the Connection info, in Heidi?
Thanks, Mathijs
I am using Heidi to connect to an SQL database. The connection works since I can connect to the DB.
I need to know the connection string.
Where can I find the Connection info, in Heidi?
Thanks, Mathijs
The connection string for MSSQL connections is only internally formed and used in HeidiSQL. Using the session manager is the right way to change parts of this connection string, but again - the connection string is nowhere displayed. One reason for not being displayed is that it contains the cleartext password, and it would be a security risk to show it somewhere.
Did some additional research, I found there is an (easy) approach to get the connection string.
It's described in just a few steps here: https://teusje.wordpress.com/2012/02/21/how-to-test-an-sql-server-connection/
Also, I was told there is a possibility to get it from MS Visual Studio as well:
Hopefully this info help others as well. Also, I hope this feature will be implemented in Heidi SQL as well (somewhere in DB / Connection properties info window for example)...
What about expanding an already contained feature: Hovering the mouse over the status bar panel with the server version on it shows a tooltip with some connection related information. The connection string is not yet contained, but that could be the first addition to add it (while clearing out the password). Secondly, as a long connection string gets unreadable in a tooltip, a click on that panel would be nice to bring up a dialog with the same information, but more readable.
If I understood correctly, the connection string is not a server-side token you need to retrieve in order to connect or anything remotely similar. It's just the syntax used by some Microsoft connectors to configure the connection (because they apparently couldn't figure out a way to just set the values separately with properly named parameters) and the programmer composes it to suit his needs. The server has no way to know what client libraries or other parameters you want to use. Certainly, it can be provided as debug information (just like many Java-powered programs display the JRE version) but that "I need to know the connection string" statement confuses me.
Include ADO connection string in status bar connection details, shorten the lines reasonably and show the full lines in a message box when clicking on it. See http://www.heidisql.com/forum.php?t=23049
Also, I noticed there that there is a potential "bug" in the Connection string info, as it is displayed in the message box. Having Heidi's session manager set to use Windows authentication to connect to the database (see first screenshot) (which is definitely not root), I connected to the db successfully, followed by checking the connection string in the message box, displaying "user Id=root), made my eyebrows frown...
And also, I noticed that the Initial Catalog (database name) is missing.
While also (more reduntant) info is displayed which typically is not of any value in the connection string..
To explain it a little: the correct Connection string for the environment I connect to is this: Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=CreditManagementServices;Data Source=[HIDDEN]
Some of the above mentioned info (Initial Catalog) is not being displayed in the Connection String currently reported by Heidi...
In a message box, you can press Ctrl+C to copy its content.
The user id in the connection string is taken from your parameters. If it's different from that, it's likely that the server modified the connection string here. I have also seen some parameters which I definitely do not set via HeidiSQL.
Is there a consideration that this might be available, at some point, for MySQL? The reason I ask is that HeidiSQL allows me to import a csv file but LOAD LOCAL DATA FILE doesn't within my php page, using the exact same query from the window on Heidi.
So I was hoping t examine any differences between your connection string and mine to see what I have got wrong.
Thanks in advance for any thoughts.
For MySQL there is just no connection string in HeidiSQL, like for MS SQL. In MySQL mode, HeidiSQL uses the C-API and passes the session parameters to functions like mysql_options()
and mysql_real_connect()
.
Regarding that LOAD LOCAL DATA
command, HeidiSQL enables the MYSQL_OPT_LOCAL_INFILE
option when initializing a connection. That may be important for your PHP driver.
Please login to leave a reply, or register at first.