-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Michael, et al --
...and then Michael Stassen said... % % The simplest solution is to keep the password in the .my.cnf file in % your home directory. See http://www.mysql.com/doc/en/Option_files.html % in the manual. OK. % % In the case of root cron jobs then, you need a .my.cnf readable only by % root in root's home. It should include % % [client] % password="mysql_root_password" What if one user connects to the database as different users (as I do, in fact; sometimes all-db-root, sometimes one-db-root, sometimes read-only user)? Let's back this out of "root" and go to "ordinary" or perhaps "kinda-limited-root" (who might have all privileges but only over a single database). And I admit that I haven't read the docs [regarding this] yet, but can one specify user A = pass A and user B = pass B and so on? % % As mysql reads the .my.cnf file, this avoids the ps "sniffing" problem, Yep. % and also keeps the password out of the script. Because you make the Gotcha. That might be all it takes. % .my.cnf file readable only by root, other users can't see it. (If they % can see it, you've got bigger problems than just the mysql password). Yeah :-) Even if we're *not* talking about root, too. % % Michael Thanks & HAND :-D - -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE/sly5Gb7uCXufRwARAgDSAKCmi5sKMsTJTZ4uRA0KyeGmLlMjQwCglTCX xhTJvgm/w/BftAHINt8e8Ho= =qeDz -----END PGP SIGNATURE----- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]