[mythtv-users] 0.25 to 0.26 upgrade issue with MYSQL
Michael T. Dean
mtdean at thirdcontact.com
Tue Aug 6 13:26:40 UTC 2013
On 08/04/2013 09:21 PM, Yeechang Lee wrote:
> Steve Greene says:
>> Yep, set to my local IP subnet. It's behaving as if "skip-networking"
>> were set. I can set myth to "localhost" as the hostname and it
>> connects.
> I recently had to recreate my database from backup and found that,
> contrary to the various instructions (such as
> <URL:http://www.mythtv.org/wiki/MythTV-HOWTO_-_0.26>),
>
> grant all on mythconverg.* to mythtv@"%.mydomain.com" identified
> by "mythtv";
>
> was insufficient to let mythbackend connect to the database on the
> same machine. I had to specify the hostname with
>
> grant all on mythconverg.* to mythtv@"hostname.mydomain.com"
> identified by "mythtv";
>
> I didn't edit the wiki because as a MySQL non-expert there is likely
> something I'm missing that does permit the first line to work, but
> there you go.
The first line will work as long as there are no other existing
more-specific permissions that cover the host in question.
So, if you have a system with an empty users table and do:
grant select on mythconverg.* to mythtv@"hostname.mydomain.com"
identified by "mythtv";
followed by:
grant all on mythconverg.* to mythtv@"%.mydomain.com" identified by
"mythtv";
followed by the obligatory:
flush privileges;
(or restarting mysqld), then hostname.mydomain.com will only be allowed
to issue SELECT statements to the mythconverg database, because that
privilege is more specific than the '%.mydomain.com' privilege. So,
it's likely that your distro put some
more-specific-than-'%.mydomain.com' privilege in place for the host that
"overrode" your generic privilege.
Note, also, that in many distros, something has been changed such that
the database passwords aren't properly updated/set by GRANT statements,
so you also have to do a SET PASSWORD to actually make the passwords work.
All of this is exactly why we hope to eventually embed the
database--because MythTV users shouldn't have to become database
administrators just to run a DVR. MySQL configuration is difficult and
requires learning a lot of MySQL-specific stuff, especially if your
distro's packages don't just do the right thing.
BTW, to the OP, are you actually using the Mythbuntu packages on your
Mint system? AIUI, you can (and you probably should, because they're
good, up-to-date packages that do a lot of the configuration for you).
Mike
More information about the mythtv-users
mailing list