Jeff Richards wrote:
Hi,
Is there a secure way of running mysql commands against the db from the
command line, or in some kind of secure batch mode, without making the
password totally visible? We need to procedurize things like "flush
tables with read lock", "unlock tables" etc. Is making the password
visible on the command line the only way?
Thanks,
Jeff
No, you can put the mysql user and password in an option file (usually
.my.cnf). Of course, you'll make this file readable only by the user running
the job. You'll need at least
[client]
user=mysql_username
password="my_password"
in the file. Actually, you can leave out the "user=..." line if the mysql
user and the unix user are the same.
For the details, see the description of option files in the manual
<http://dev.mysql.com/doc/mysql/en/option-files.html>.
Michael
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]