Where is the best place to store the mysql root password?
I had been putting it only in the root user's
/root/.my.cnf file, which works fine for doing normal updates, backups, etc.
However, the (debian)/ubuntu logrotate script (for instance) doesn't look at that file.
I've currently worked around this by adding:
/etc/mysql/debian.cnf file, but this seems kind of ... wrong. For a start, there's big
# Automatically generated for Debian Scripts. DO NOT TOUCH
at the top of the file.
There is no
debian-sys-maint user in
/etc/passwd, which I thought had something to do with it - but is that historical now?
Any current best practices/documentation I'm missing?