[mythtv-users] Cannot get the backend to run

Mark Knecht markknecht at gmail.com
Sat May 23 04:19:52 UTC 2009

On Fri, May 22, 2009 at 8:51 PM, Jarom McDonald <jlmcdonald at gmail.com> wrote:
> On Fri, May 22, 2009 at 4:33 PM, Mark Knecht <markknecht at gmail.com> wrote:
>> On Fri, May 22, 2009 at 3:26 PM, Jarom McDonald <jarom_mcdonald at byu.edu>
>> wrote:
>> > The one piece of information you haven't provided yet are the details of
>> > your mysql user tables on the non-working and the working servers.
>> > Remember
>> > that a mysql user is a combination of a username and a hostname, so
>> > mythtv at localhost and mythtv at macMini and mythtv at are 3
>> > separate
>> > users (even if, on the OS level, they all resolve to each other). The
>> > error
>> > message you're getting on MacMini is not a Myth error, but a MySQL error
>> > telling you that the mythtv at macMini user has been denied access. There
>> > are
>> > only three reasons for this: 1) mysql isn't configured to accept any
>> > users
>> > not from the 'localhost' host, 2) the password in mysql.txt isn't
>> > corresponding with the password in the mysql tables, or 3) the
>> > mysql at macMini
>> > user doesn't even exist.
>> >
>> > You've ruled out 1 and 2, but haven't ruled out 3. In your mysql user
>> > table,
>> > ("SELECT user,host FROM user") you have a mythtv at localhost (evident from
>> > your very first message that let you connect), and you have a
>> > mythtv at (that was created when you did the GRANT statement),
>> > but
>> > you should check to see if you have a mythtv at macMini, and that ITS
>> > password
>> > is properly set, since that's the user that mythbackend is trying to
>> > connect
>> > with. You could just do:
>> >
>> > GRANT ALL on mythconverg.* to mythtv at macMini IDENTIFIED BY "[password]"
>> >
>> > just as you did with the user that has the ip address as the hostname,
>> > to
>> > insure that the user exists with the right password.
>> >
>> > If THAT fails, then I don't know what to say ... there could be some
>> > corruption in the mysql user tables. You could delete all users and
>> > re-create them, I suppose, or drop the DBs and reinstall mysql (you did
>> > say
>> > this was a new server, correct?)
>> >
>> > Jarom
>> >
>> Jarom,
>>   It is a completely new server with no recordings. I'm free to do
>> anything. I'll be using my HD Homerun with this server and taking the
>> older PVR-150 server out of service as Comcast ramps down analog
>> transmission.
>>   I'm completely happy to remove every database and start over if it
>> makes a difference. That way at least there shouldn't be so many
>> questions about what's been done to the database.
>>   What is the actual command I use in mysql to check this? I'd like
>> to check before I issue a new GRANT ALL. I think I'd learn something
>> important.
>>   I suspect that mythtv at macmini has not been accounted for.
>> - Mark
> If you're doing it from the command line, try these steps.
> 1) Log in to the mysql shell as root with this command:
> mysql -u root -p
> 2) Enter the mysql root password when prompted
> 3) Select the mysql table with this command:
> use mysql
> 4) Query the user table with this command (don't forget the semicolon on the
> end of the query):
> SELECT user,host FROM user;
> 5) If you don't have a row that has "mythtv" in the user column and either
> "macMini" or "%" (the mysql wildcard) in the host column, you can create
> that user with this command:
> CREATE USER mythtv at macMini IDENTIFIED BY [whatever password your mysql.txt
> or config.xml file uses]
> 6) Grant that user permissions to use the mythconverg DB with this command:
> GRANT ALL on mythconverg.* TO mythtv at macMini
> 7) Flush privileges
> Of course, all of this raises a very important question that smarter people
> than I will have to address ... why, when the backend or mythtv-setup is
> trying to start, is it trying to connect to the hostname macMini rather than
> localhost? That's really the root of the problems (it's not something I've
> seen before...my backend just connects with mythtv at localhost), and may have
> to eventually be addressed if you're ever planning on adding additional
> backends or frontends. I take it this is actually installed on a macMini? If
> so, is it on OS X or did you install linux onto your Mini? I guess it's
> possible that, if you're actually running it on OS X, there's something with
> how that OS handles hostnames that is messing with Myth...
> I hope this helps in any way.
> Best,
> Jarom

   Thanks for the great information. I'm going to work on this a bunch
tomorrow and see if I can get it worked out.

   For clarity, this is Gentoo on the Mac Mini, not OS X.

   As I have no recordings yet I did a drop on the mythtv database, as
much to force myself to go back through the steps again from scratch
and watch what happens step by step. I'll reinstall mythconverg
tomorrow, add priviledges, etc., and see if I can get it going.

   As for why there may be problems with the install, it's my
unsubstantiated opinion that the frontend/backend process isn't really
bullet proof for the case that I'm doing which is a pure backend that
will eventually replace an existing backend. My new backend has no
video, no keyboard, no mouse. It's just a little Mac Mini box sitting
there running Gentoo. It will control one or maybe two HD Homeruns and
an external hard drive, but it's just a little brick sitting in the
corner and everything to make it work has to be done remotely. The
machine doesn't currently run X at all so there's no way to run
mythtv-setup. The frontends already exist but they point at an older
server. When this machine comes up they will switch from
to 1.61 and off they go.

   Again, this stuff is probably all my making and I'll work it out. I
appreciate your help as I do.


More information about the mythtv-users mailing list