does not start the connection

ftn's profile image ftn posted 5 years ago in General Permalink

doing a clean install

running heidisql.exe 10.2.0.5608 i create a new connection, and try to connect and the window just closes.

systeminfo: OS Name: Microsoft(R) Windows(R) XP Professional x64 Edition OS Version: 5.2.3790 Service Pack 2 Build 3790

PS. heidisql.exe 9.5.0.5459 works without problems. removed portable_settings.txt and all without changes, how can I start the debug mode?

1 attachment(s):
ansgar's profile image ansgar posted 5 years ago Permalink

Was the v10.1 working for you?

I recall I updated the database dlls for v10.1, but no update between 10.1 and 10.2, so it may be some different cause.

ansgar's profile image ansgar posted 5 years ago Permalink

You can activate debug messages in the console, in Preferences > Logging. In the session manager click on the "More" button to get to the preferences window.

ftn's profile image ftn posted 5 years ago Permalink

HeidiSQL 10.1.0.5580 64 Bit, not working.

How can a console be useful? if it appears after connecting to the server? so it is impossible to understand why the connection did not start. there are no errors in the operating system logs.

ftn's profile image ftn posted 5 years ago Permalink

and 10.1.0.5560 also not working.

ftn's profile image ftn posted 5 years ago Permalink

HeidiSQL_10.0.0.5460 it works.

ansgar's profile image ansgar posted 5 years ago Permalink

Yes, of course, you can see the console only when the connection started successfully. But you could also enable writing session logs to file, in the log preferences. Then, after a failed connection, you could watch the latest log file from

C:\Users\<yourUsername>\AppData\Roaming\HeidiSQL\Sessionlogs\

Hopefully this sheds some light into this issue. Don't forget we are talking about Windows XP, which is very old. And yes, HeidiSQL aims to still support it, but doing so is getting more and more difficult.

ftn's profile image ftn posted 5 years ago Permalink

OK, I've enabled the console but I don't see any startup errors in the reports, see the attached file. Is it possible to increase the debug level? Yes, Windows XP is old, I'm probably the only one who still uses it :). If the problem can not be solved, you can write that with version 10.1 XP support is discontinued.

1 attachment(s):
ansgar's profile image ansgar posted 5 years ago Permalink

You are using one of the themes. These raised many problems already. I'd recommend turning that setting back to "Windows" (Session manager > More > Preferences)

ftn's profile image ftn posted 5 years ago Permalink

It's definitely not in the themes. the windows theme also does not start.

If you run version 10.0.0.5460, disconnect from all servers. close the window and run for example version 10.2.0.5609 then we will be able to see the Session manager window. when you try to open a session, everything is closed.

1 attachment(s):
ftn's profile image ftn posted 5 years ago Permalink

See the session start

1 attachment(s):
  • 2019-07-02_09-17-17
ansgar's profile image ansgar posted 5 years ago Permalink

For narrowing it even more down to a specific version, you could please try out the following builds (just place them besides your existing heidisql.exe and run them):

ftn's profile image ftn posted 5 years ago Permalink

404 - executable for r5464 not found 404 - executable for r5466 not found

ansgar's profile image ansgar posted 5 years ago Permalink

Ah shit I cleaned up the build folders recently...

Well, in the meantime I could reproduce such a sudden app termination myself, while connecting to an old MySQL 4.0 server. The crash went away after deleting/renaming libmariadb.dll, so I only had libmysql.dll in the HeidiSQL folder. Please do the same to check if that helps. If yes, you hit issue #697.

ftn's profile image ftn posted 5 years ago Permalink

deleted libmariadb.dll, no change. brought back and deleted libmysql.dll, also unchanged. I think the problem lies elsewhere, otherwise there would be no entry in the records of the session on successful SQL query.

ftn's profile image ftn posted 5 years ago Permalink

I use connect to mysql 5.6.44

ansgar's profile image ansgar posted 5 years ago Permalink

I suspect your logfile to contain more after that SHOW DATABASES line, unless HeidiSQL was unable to finish writing to that logfile. Could you check that in your log file?

ftn's profile image ftn posted 5 years ago Permalink

heidisql 10.2.0.5614 libmysql.dll

ftn's profile image ftn posted 5 years ago Permalink

heidisql 10.2.0.5614 libmysql.dll

2 attachment(s):
ftn's profile image ftn posted 5 years ago Permalink

heidisql 10.2.0.5614 libmariadb.dll log file 000013.log - 0 byte

1 attachment(s):
  • heidisql10.2.0.5614_2019-07-08_11-21-50
ansgar's profile image ansgar posted 5 years ago Permalink

This is quite problematic, if the log file is not updated at the end for some reason.

Code modification/commit 2a91a13 from Ansgar Becker <anse@heidisql.com>, 5 years ago, revision 10.2.0.5615
Issue #677:
* drop workaround for application crash on WinXP, when loading newer libmariadb (see #79)
* raise TDbLib's own exception instead of baking an own one with less details. Probably helps in debugging: https://www.heidisql.com/forum.php?t=34044
* rename EDatabaseError to EDbError, to overcome naming conflict in DB unit
* load libpq.dll always with path, which should anyway work better than without it. See http://www.heidisql.com/forum.php?t=22514
ansgar's profile image ansgar posted 5 years ago Permalink

Please update again to the latest build. I have just pushed some changes which at least should show a more detailed message when using libmariadb. Also try libmysql again. And be sure to use the dlls from the last official release 10.2.

ftn's profile image ftn posted 5 years ago Permalink

I use:

  • heidisql32.r5616.exe - 8 240 695 bytes
  • heidisql64.r5616.exe - 9 103 415 bytes
  • libmariadb.dll E46FACF134CCB3C6C04F196E9C717F58 - 1 025 448 bytes
  • libmysql.dll 8AD4DA6DD06F1DEA86EFF2129B2A2B38 - 183 296 bytes
  1. Run heidisql32.r5616.exe + libmariadb.dll = Library libmariadb.dll could not be loaded. Please select a different one. Internal error 193: %1 is not a valid Win32 application
  2. Run heidisql32.r5616.exe + libmysql.dll = Library libmysql.dll could not be loaded. Please select a different one. Internal error 193: %1 is not a valid Win32 application
  3. Run heidisql64.r5616.exe + libmariadb.dll =
  • The procedure entry point InitOnceExecuteOnce could not be located in the dynamic link library KERNEL32.dll.
  • Library libmariadb.dll could not be loaded. Please select a different one. Internal error 127: The specified procedure could not be found
  1. Run heidisql64.r5616.exe + libmysql.dll = no errors and window closes.

Session not started. not write session.log

3 attachment(s):
  • heidisql32.r5616_2019-07-09_11-43-42
  • heidisql32.r5616_2019-07-09_11-27-19
  • csrss_2019-07-09_11-32-10
ansgar's profile image ansgar posted 5 years ago Permalink

So you installed the 64 bit version and tried the 32bit lib's which of course fail to load. So far so normal. Now, while my libmariadb.dll has the same size as yours, your 64bit libmysql.dll has a different size than mine:

  • yours: 183 296 bytes
  • mine: 4 747 776 bytes

You could update libmysql.dll from the 64 bit portable zip.

ftn's profile image ftn posted 5 years ago Permalink

good updated and used libmysql.dll (4 747 776 bytes). window closes. Session not started. see 000002.log

1 attachment(s):
ansgar's profile image ansgar posted 5 years ago Permalink

Ok, after that last half written log line, there is normally this one:

Restoring tab setup from C:\Users\&lt;username&gt;\AppData\Roaming\HeidiSQL\tabs.ini

The path is probably only valid on Win10, and Win7 probably, but on XP it's probably such one:

C:\Documents and Settings\&lt;yourusername&gt;\Application Data\HeidiSQL\tabs.ini

I suspect the restore-tabs feature to fail because the folder cannot be located or written to for some reason. Please look at the path if it exists.

ansgar's profile image ansgar posted 5 years ago Permalink

Ah and you could disable that restore-feature, in the session manager > More > Preferences > Files > "Reopen previously used ..."

ftn's profile image ftn posted 5 years ago Permalink

File tabs.ini found in C:\Documents and Settings\Administrator\Application Data\HeidiSQL Yes if I disable the option "Reopen previously used SQL files and unsaved content in tabs *", session starts successfully.

can be use system variable "APPDATA" ?

  • XP 64 C:>set | find "APPDATA" APPDATA=C:\Documents and Settings\Administrator\Application Data

  • Vista,W7,W8,W10 64 C:>set | find "APPDATA" APPDATA=C:\Users\Administrator\AppData\Roaming

thanks, great job.

ftn's profile image ftn posted 5 years ago Permalink

strangely, the library selection is not saved for the connection, although it is suggested to save the changes. and puts all time libmariadb.dll

ansgar's profile image ansgar posted 5 years ago Permalink

Did you press the "Save" button to save the library change?

The directory is what I expected on XP, and you say tabs.ini is there, so I wonder why HeidiSQL crashes when accessing it. Probably because it cannot create the subfolder "Backups" there - is it there?

C:\Documents and Settings\Administrator\Application Data\HeidiSQL\Backups\

And is there any .sql file in it?

ftn's profile image ftn posted 5 years ago Permalink

Yes, I pressed save. Folder exists C:\Documents and Settings\Administrator\Application Data\HeidiSQL\Backups\ but files in it there is no

ansgar's profile image ansgar posted 5 years ago Permalink

Ok, I think I am going to disable the restore/store feature when the tabs.ini cannot be written.

Code modification/commit 6510212 from Ansgar Becker <anse@heidisql.com>, 5 years ago, revision 10.2.0.5618
Disable tab restore/store when tabs.ini is not writable. See https://www.heidisql.com/forum.php?t=34044#p34148
ftn's profile image ftn posted 5 years ago Permalink

how to determine the cause of cannot be written?

you should probably write in the report, it is impossible to write for the reason: insufficient rights (for example, the folder has a read-only attribute)

ansgar's profile image ansgar posted 5 years ago Permalink

You could again update to the latest build, which now disables the tab re/store feature when writing tabs.ini fails. Of course you need to activate that again through preferences > Files.

By the way, thanks a lot for your quick testing and feedback.

ftn's profile image ftn posted 5 years ago Permalink

updated (HeidiSQL 10.2.0.5618 64 Bit) and set on "Reopen previously used SQL files and unsaved content in tabs *" Run connection, window closes session not started.

1 attachment(s):
Code modification/commit aa2ee9f from Ansgar Becker <anse@heidisql.com>, 5 years ago, revision 10.2.0.5619
Restore tabs feature crashes often on old XP systems, so we activate it by default only on Vista and newer. See https://www.heidisql.com/forum.php?t=34044
ansgar's profile image ansgar posted 5 years ago Permalink

Hm, shit.

Did you or could you check if you can manually make changes to that tabs.ini file? And if no, why you have no access to it?

ftn's profile image ftn posted 5 years ago Permalink

changes write I can, just in case I deleted the whole folder C:\Documents and Settings\Administrator\Application Data\HeidiSQL, as the file were references to nonexistent files .sql, in the hope that the application will create because of the new folder and files. but only the folder is created C:\Documents and Settings\Administrator\Application Data\HeidiSQL it is empty.

I also noticed this oddity, if you change the setting "Reopen previously used SQL files and unsaved content in tabs *" and the session does not start, the settings are not saved. you need to open the settings from the beginning to change then close the application, then the settings are saved.

if unset "Reopen previously used SQL files and unsaved content in tabs *", application running normaly and starting session.

Code modification/commit 0a31363 from Ansgar Becker <anse@heidisql.com>, 5 years ago, revision 10.2.0.5625
Append system error message to error dialog popping up when tabs.ini is not writable. See https://www.heidisql.com/forum.php?t=34044

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