Cannot find a usable libmysql.dll. Please launch heidisql.exe from the directory where you have installed it.

rsterenb's profile image rsterenb posted 8 years ago in Creating a connection Permalink

Hi,

Scenario:

  • Installed HeidiSQL using the latest installer, and immediately updated to the then latest build (at the time of writing: 5160).
  • Connecting to a database works.
  • Check for updates, and update using the update function.
  • Updating seems to work, HeidiSQL restarts by itself.
  • Connecting to a (the same) database results in the message: "Cannot find a usable libmysql.dll. [..etc..]".
  • The file libmysql.dll is still in the same directory as heidisql.exe.
  • It doesn't help if I download the latest build and replace heididsql.exe myself.

To "solve" this issue I did this:

  • Re-install HeidiSQL using the latest installer.
  • Connecting to a database works.
  • Check for updates and update using the update function.
  • Updating works, HeidiSQL restarts by itself.
  • Connecting to a database works.

I have this for a couple of days now. I'm running HeidiSQL on Fedora 25 with Wine 2.2 (didn't test on Windows, but it used to work on Linux with Wine). Is it me, or..?

Thanks!

[expired user #10605]'s profile image [expired user #10605] posted 8 years ago Permalink

Happened the last 2 times for me (I could have omitted a few versions)

  • Windows 7
  • HeidiSQL Version 9.4.0.5168 (64Bit) Nightly Build
ansgar's profile image ansgar posted 8 years ago Permalink

So, is there some working reproduction recipe or does that happen randomly?

rsterenb's profile image rsterenb posted 8 years ago Permalink

When I first posted this I could reproduce it everytime I updated. It worked exactly as I described in my post.

If you cannot reproduce the behavior, then maybe it's something in my (our?) Wine config.

[expired user #10605]'s profile image [expired user #10605] posted 8 years ago Permalink

I don't know how to reproduce the error. But this is how it happened (at least as I recall it):

  • Update triggers on startup
  • update process spawns 2 times
  • heidisql.exe has another name (i think something with "update")
  • heidisql launches but can't connect to a database with message "can't find xxx.dll"
  • complete reinstall removes the problem

I would like to help you more (especially better error messages and filenames), but installing an older version and triggering an update doesn't reproduce the problem.

rsterenb's profile image rsterenb posted 8 years ago Permalink

@stormsr: are you on Windows or on *nix with Wine?

[expired user #10605]'s profile image [expired user #10605] posted 8 years ago Permalink

@rsterenb: Windows 7

ansgar's profile image ansgar posted 8 years ago Permalink

@stormsr, your report with the updater lets me think that the automatic restart of heidisql.exe after the update is done with administrator privileges. If that's the problem, administrator is not able to read the libpq.dll. Doesn't make much sense at first sight. But I recently had similar problems in my win10 Explorer, while copying a file from a network drive to c:\program files (x86)\xyz\ . I clicked "yes" as Windows asked me for allowance of copying to that directory, but then suddenly the network drive was not available (for the administrator user). This is a bit different situation as you have, while I'm sure there can be much confusion when mixing user privileges.

Long story short: after updating HeidiSQL through the automatic updater, you should simply cancel the following automatic start of HeidiSQL, then run HeidiSQL again, manually.

[expired user #10605]'s profile image [expired user #10605] posted 8 years ago Permalink

Hello,

Update to Version 9.4.0.5169 (64 Bit) worked fine. Although i didn't change the process.

rsterenb's profile image rsterenb posted 8 years ago Permalink

Yes, at some point it started to just work again as before. For me: case closed.

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