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

rsterenb posted 8 months ago in Creating a connection



  • 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..?


stormsr posted 7 months ago

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

  • Windows 7
  • HeidiSQL Version (64Bit) Nightly Build
ansgar posted 7 months ago

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

rsterenb posted 7 months ago

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.

stormsr posted 7 months ago

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 posted 7 months ago

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

stormsr posted 7 months ago

@rsterenb: Windows 7

ansgar posted 7 months ago

@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.

stormsr posted 6 months ago


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

rsterenb posted 6 months ago

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.