MySQL Forums
Forum List  »  Security

Access rights vs. batch process
Posted by: Tom Kovar
Date: May 27, 2007 06:30AM

I have a problem with passing the password to mysqladmin, which I do not understand (on Linux).

I have to run mysqladmin as root@localhost from cron. If the script calls
mysqladmin -pxxxx command, everything runs well - but I do not want it like this, as I do not want the password to be visible on the ps list.

Thus I have created the ~root/.my.cnf file (properly with filemode 0700 :-)) with the password entry in the [client] section. Runs fine if I start "mysqladmin" or "mysql" interactively without -p. But when started from a cron script, I keep getting the famous error

usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

What is wrong here??

Thanks for any help,
--- Tom

Options: ReplyQuote


Subject
Views
Written By
Posted
Access rights vs. batch process
4411
May 27, 2007 06:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.