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:
!include /root/.my.cnf
to the /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?
/etc/mysql/debian.cnffile is where the username/password should be put (which seems reasonable), when why the big warning at the top saying not to edit it? – Daniel Mar 29 '17 at 10:38SELECT user,host FROM mysql.user;– DerfK Mar 29 '17 at 16:00