[odb-users] Utilizing MySQL Login Paths
Tyler Lytle
tlytle123 at gmail.com
Tue Jun 3 12:14:19 EDT 2025
Ah, I didn't think about getting that far down into the weeds. I will do
some research into it and see what I can do on my end then. I appreciate
the feedback.
On Tue, Jun 3, 2025 at 6:12 AM Boris Kolpackov <boris at codesynthesis.com>
wrote:
> Tyler Lytle <tlytle123 at gmail.com> writes:
>
> > I am trying to utilize MySQL login path configurations. These are located
> > in the home directory of the current user in a hidden file named
> > .mylogin.cnf. It contains an encrypted password and a default
> > username/hostname. From the command-line, if I simply execute "mysql" and
> > it will automatically log me into MySQL without specifying a
> > username/password on the command-line and without a password prompt.
> >
> > Can I utilize this in any way with the MySQL ODB database class?
>
> ODB uses the libmysqlclient C library and all the database class
> arguments are passed essentially as-is to its function that creates
> the connection.
>
> So to answer your question we will need to understand whether this
> .mylogin.cnf file is something specific to the mysql client program
> or if libmysqlclient also supports using it as a source of login
> information.
>
> If the answer is "yes", then we would need to understand how exactly
> this is triggered. Maybe via a client_flags?
>
> If the answer if "no", then the only option is for you to parse this
> file yourself, extract all the information and pass it to the ODB
> database constructor.
>
--
Tyler Lytle
E-Mail: tlytle123 at gmail.com
More information about the odb-users
mailing list