I don’t know for certain you aren’t correct.  _But_, the point was that the mariadb client proper can make the same connection successfully.  Same username, password, and schema; from the same source host.  So I’m fairly certain the problem isn’t on the server side.

 

 

From: Marc <Marc@f1-outsourcing.eu>
Date: Wednesday, July 24, 2024 at 15:54
To: Chris Ross (cross2) <cross2@cisco.com>, discuss@lists.mariadb.org <discuss@lists.mariadb.org>
Subject: RE: mariadb connector/c client not using SSL

>
> However, a program of mine which uses mysql_real_connect() fails,
> reporting “Access denied for user ‘foo’@’ip’ (using password: YES)”.
> This is, I assume, because the user on the database side requires ssl,
> and my client is not using ssl.
>
>

looks to me you are missing a grant or so

grant select on foo.* to foouser ...
flush privileges;