MySQL Connection Issues

Hi There,

I have just started to try and connect to MySQL from XOJO and have encountered the following error:

Authentication plugin ‘caching_sha2_password’ cannot be loaded: dlopen(/Users/williamyu/builds/lib/plugin/caching_sha2_password.so, 2): image not found

I don’t have this issue connection with other tools and via C#, so I’m assuming it is a XOJO issue… any ideas?

Thanks

These may help:

https://forum.xojo.com/49634-mysql-connection-error
https://forum.xojo.com/48779-mysql-caching-sha2-password-error
https://forum.xojo.com/49017-can-t-authenticate-against-mysql-com-server
https://forum.xojo.com/52627-unable-to-connect-to-database-caching-sha2-password-workaround

Thanks Anthony, I have already done that.

The error message would suggest that it is a build problem: /Users/williamyu/builds/lib/plugin/caching_sha2_password.so,

And given that it is so basic, one has to ask what kind of testing is being done on this and why by now in the current release it is still an issue. I mean seriously, if you can’t connect to the database who could you even run any tests???

Didn’t notice William’s name in the path before. This sounds like something Xojo may need to address.

One thought:

I didn’t see a version of Xojo mentioned in your post… have you tried using the plugin from a different version of Xojo? The issue may be an issue with the version of the MySQL plugin being used.

when a project is linked it stores a path name of various libs/dylibs
but at runtime it just blurts that path back out because it cant say much more
the name, not the entire path , is really whats important

have all the plugin bits been copied as binary etc to the target ?
seems one might be missing

I found a solution that worked fine for me.

Basically, I created another user, and then changed the password on that new user, using the old mysql_native_password plugin:

ALTER USER 'xojo'@'%' IDENTIFIED WITH mysql_native_password BY 'passW0rd'; flush privileges;

I can now connect.

PS I don’t understand the history of this problem. Seems like it might be a Xojo issue though because the command line mysql client on Mac (I installed a local mysql server with Homebrew) and my GUI client, Querious, all work ok with either the ‘old’ mysql_native_password or the new sha2 format…

Maybe it has something to do with the authentication method configured in MySQL.

I updated one of our console projects that targets macOS 64 bit, MS-Windows 64 bit and Linux 64 bit to Xojo 2019r1.1 last week and all targets successfully interacted with MySQL 5.6 running on my Mac.

@Kevin Gale - oh probably. I installed MySQL 5.7 with Home-brew. I know you can get MySQL in a few different ways - HB is really really easy and probably has the SHA2 password plugin setup by default. It does look like some issue with the Xojo Plugin since CLI and DB GUI clients connect no problem with the SHA2 default.

The re-set password with the mysql_native_password option seems to work perfectly :slight_smile: the only problem was recognizing the problem, which took me a while lol.