Alek,
Create a file of any name, e.g. script.cnf.
Put the following in it,
[client]
user = dba
password = dba_pass
Run mysql with the --defaults-file arg
mysql --defaults-file=script.cnf
So long as the cnf file is only readable by the the cronjob owner this
will provide the level of security you require.
Richard.
For more info see, http://dev.mysql.com/doc/mysql/en/Option_files.html
----- Original Message -----
From: "Aleksandar Mihajlovic" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 30, 2004 8:03 PM
Subject: Password displayed in process list
> Hi,
>
> I am new to MySQL and have one question.
>
> I would like to run mysql job as a batch job (scheduled through cron) and
have to provide password to the batch job:
>
> mysql -udba -ppassword
>
> My concern that anybody running:
>
> ps -ef
>
> will be able to see the password when job is run.
>
> Is there any way to run mysql as a batch job with
>
> mysql -udba -p
>
> and pump a password from inside your script. Something like:
>
> mysql -udba -p << EOF < .hidden_pwd_file
> use mysql
> select * ....
> EOF
>
> I've tried a few things but I am out of ideas. Any help would be
appreciated.
>
> Alek
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Friends. Fun. Try the all-new Yahoo! Messenger
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]