[mythtv-users] [mythtv-commits] Ticket #9742: Mythtv-setup fails to create the initial database

Michael T. Dean mtdean at thirdcontact.com
Wed Apr 20 20:26:23 UTC 2011


On 04/20/2011 04:18 PM, Frank Phillips wrote:
> On Wed, Apr 20, 2011 at 1:46 PM, Michael T. Dean wrote:
>> I /think/ however, I've figured out what's going on.  I was able to
>> reproduce the symptoms, using an "unusual" approach to creating the
>> MythTV database.  What I found is not a MySQL 5.5 issue--it would be the
>> same on any MySQL version.  The problem seems to be caused by a
>> combination of using an over-privileged MySQL user and an issue in Qt.
>> I have a fix that I'll be pushing shortly, so if the Arch packager (is
>> that you?) could make available packages for the new version with the
>> fix, that may solve the problem.
> Not the packager: I'm an Arch user who rolls his own -fixes.

Ah, OK.  I don't know the Arch team, yet, so I was just guessing because 
you seemed to know a bit about what was going on.  :)

>> Basically, I was able to reproduce the symptoms by using the MySQL root
>> user to access the database (actually specified root in the mythtv-setup
>> dialog asking for database connection information).  However, the same
>> problem would occur if any other user that had access to any
>> non-mythconverg tables were specified (so, if the mythtv MySQL user had
>> access to tables in some other database on the same MySQL server, it
>> would give the same failure).  I'm guessing, however, that these users
>> are actually specifying the MySQL root user--in which case, it would be
>> good to explicitly document that they should use the less-privileged
>> mythtv user they just created (if asked for database connection
>> information) in your HOWTO at
>> https://wiki.archlinux.org/index.php/MythTV_HOWTO#Setting_up_the_database.
>> Since the HOWTO tells them to create a mysql.txt that specifies the
>> mythtv user, it may not be what's happening, but it's the only way I
>> could repro the symptoms
> Interesting! It makes more sense than being related to #8585, which is what
> I had assumed, since it was the only bug about mysql-5.5 and the reports
> started showing up in February, when we switched to 5.5.
>
> Actually, I think this must have started after a wiki edit December 16 which
> included these lines:
>
> grant all privileges on *.* to 'mythtv'@'%' with grant option;
> grant all privileges on *.* to 'mythtv'@'localhost' with grant option;
>
> This gives the mythtv permission on all databases rather than just
> "mythconverg.*", which combined with the code flaw caused the tables not to
> be created.

Ah, yeah, that would do it--since on any database there will always be a 
mysql schema.  And we only started getting these reports around the 
beginning of the year.  The code that was causing us to think we had a 
database when we didn't only exists in 0.24 and above, so users with 
0.23-fixes wouldn't have seen it, even if they had done the above grants.

Thanks for tracking this down, and now I'm pretty sure that we did fix 
the right bug.

Mike


More information about the mythtv-users mailing list