password in .my.cnf-file

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Is it possible to use password in .my.cnf file automatically with
function mysql_real_connection()?

I mean so that it uses password mentioned in ini-file, so not to hard
code it into program code, as mysql-client does.

I am using version 4.1.9 for pc-linux-gnu (commercial version)


Re: password in .my.cnf-file

pekka wrote:
Quoted text here. Click to load it

 From the docs, it appears that the way it is supposed to work is that
you first use mysql_options() to specify the my.cnf filename and the
group name within the file.  Then it can find the user and password within.

See example with code at:

Bill K.

Re: password in .my.cnf-file

Thanks Bill, that was just what I needed.


Site Timeline