Curious how that works? Here's a simple example:
1. Be sure to have the "plugins" directory in C:\Program files\HeidiSQL\, and the dialog.dll. This is done automatically when installing a newer beta build from the download page.
2. On your server, install the plugin "dialog.dll":
INSTALL PLUGIN three_attempts SONAME 'dialog.dll';
3. On your server, create a new user which authenticates via this plugin:
CREATE USER test_dialog IDENTIFIED VIA three_attempts USING 'SECRET';
FLUSH PRIVILEGES;
4. That's it. Start HeidiSQL and try to connect with a wrong or empty password. libmysql calls Heidi's mysql_authentication_dialog_ask method which pops up the following dialog:
See also:
* MariaDB knowledge base article on pluggable authentication
* MariaDB: Improve Security with Two-Step Verification, an article by Sergei.