[mythtv-users] running mythconverg_backup.pl as non-mythtv user
Joey Morris
rjmorris at nc.rr.com
Sun Aug 19 16:11:56 UTC 2012
I tried to run mythconverg_backup.pl on a 0.24 database as a user
other than my mythtv user. I also run mythfrontend as that user, so
the user has the appropriate mythconverg username/password defined in
the files under the ~/.mythtv directory. When I ran the backup script,
it failed with the message:
mysqldump: Got error: 1045: Access denied for user
'mythtv'@'localhost' (using password: YES) when trying to connect
It looks like the backup script is picking up the database password
from ~/.my.cnf instead of from the files in ~/.mythtv. The script does
output this:
Attempting to use supplied password for mysqldump.
Any [client] or [mysqldump] password specified in the MySQL options
file will take precedence.
So maybe I should have expected ~/.my.cnf to override the supplied
password. When I saw that message, though, I think I misunderstood
which password it considered the "supplied password" and/or which file
it meant by the "MySQL options file". I assumed the supplied password
was the one in ~/.mythtv/config.xml and the MySQL options file was
~/.mythtv/mysql.txt.
I was able to work around this problem in two different ways:
1) I edited the script to change the mysqldump option
--defaults-extra-file to --defaults-file.
2) I renamed the user's .my.cnf file (after changing the script back
to --defaults-extra-file).
Is it recommended to run the backup script as the mythtv user? If I do
run it as a non-mythtv user, is there a better way to make it work
than the workarounds I used?
More information about the mythtv-users
mailing list