Re: Password in connection string
| From: | James | Date: | Mon, 12 May 2003 10:23:14 +0000 |
| Subject: | Re: Password in connection string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147283@lists.php.net to get a copy of this message | ||
Edit the pear source.
"Ron Rudman" <ron@helphosts.com> wrote in message
news:20030512003648.34874.qmail@pb1.pair.com...
> I'm using PEAR and a MySQL database. My connection string contains
> <user>:<password> and works fine. But I don't like having passwords in
> clear text. Is there any way for me to not have to code the password but
> instead let MySQL find it in a my.cnf file?
>
> I've tried with <user>=mysql, which is the owner of mysqld, and I've put
the
> password in the [client] section of mysql's home directory. What's
> happening is that by omitting the password in the connection string, the
> connection is attempted with "using password=NO". This is unlike the
> behavior of other clients for mysql.
>
> Is there any way to do this?
>
> BTW, I've found one "solution" to be: put the setting of the connection
> string, which is a $_SESSION variable, in a file that's not in the
document
> root, then REQUIRE that file.
>
>