[mythtv-users] Problem with Ubuntu upgrade

Greg Oliver oliver.greg at gmail.com
Fri Oct 22 16:26:18 UTC 2010


On Fri, Oct 22, 2010 at 11:20 AM, Damian <myth at surr.co.uk> wrote:
> On 22/10/2010 01:05, Greg Oliver wrote:
>>
>> On Thu, Oct 21, 2010 at 6:22 PM, Damian<myth at surr.co.uk>  wrote:
>>>
>>> On 21/10/2010 23:13, Greg Oliver wrote:
>>>>
>>>> On Thu, Oct 21, 2010 at 4:58 PM, Damian<myth at surr.co.uk>    wrote:
>>>>>
>>>>> On 21/10/2010 13:00, mythtv-users-request at mythtv.org wrote:
>>>>>>
>>>>>> Date: Thu, 21 Oct 2010 12:09:45 +0100
>>>>>> From: Jason Chambers<lists at purplish-monkey.com>
>>>>>> Subject: Re: [mythtv-users] Problem with Ubuntu upgrade
>>>>>> To:mythtv-users at mythtv.org
>>>>>> Message-ID:<4CC01F79.1090802 at purplish-monkey.com>
>>>>>> Content-Type: text/plain; charset=ISO-8859-1
>>>>>>
>>>>>> On 20/10/2010 09:46, Damian wrote:
>>>>>>>
>>>>>>>>  On 20/10/2010 01:37, David Whyte wrote:
>>>>>>>>
>>>>>>>>>>  On Wed, Oct 20, 2010 at 9:11 AM, Damian<myth at surr.co.uk>
>>>>>>>>>> wrote:
>>>>>>
>>>>>> <snip>
>>>>>>
>>>>>>>>>>>>  2010-10-20 00:01:05.162 New DB connection, total: 1
>>>>>>>>>>>>  2010-10-20 00:01:05.169 Unable to connect to database!
>>>>>>>>>>>>  2010-10-20 00:01:05.176 Driver error was [1/1045]:
>>>>>>>>>>>>  QMYSQL: Unable to connect
>>>>>>>>>>>>  Database error was:
>>>>>>>>>>>>  Access denied for user 'mythtv'@'MythBox' (using password: YES)
>>>>>>>>>>>>
>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>  Maybe you need to make sure of the following:
>>>>>>>>>>
>>>>>>>>>>  1) You have your mythtv configuration files configured properly
>>>>>>>>>> with
>>>>>>>>>>  the correct mythtv DB credentials.  There are numerous files to
>>>>>>>>>> check
>>>>>>>>>>  here.
>>>>>>>>>>  2) Is your mysql binding to the correct network address and
>>>>>>>>>> allowing
>>>>>>>>>>  connections from within your LAN.
>>>>>>
>>>>>> I don't think its 2) as that would give a different error. The message
>>>>>> would be "Can't connect to MySQL server on ..." wouldn't it?
>>>>>>
>>>>>> The access denied messages suggests that the
>>>>>> username/password/database
>>>>>> name are wrong.  See
>>>>>> http://dev.mysql.com/doc/refman/5.1/en/access-denied.html.
>>>>>>
>>>>>> So either your ~/.mythtv/config.xml has the wrong values in it, or
>>>>>> something (probably the upgrade from the sounds of your original post)
>>>>>> has changed/removed the user's password or permissions.
>>>>>>
>>>>>>>>  My understanding goes as far as agreeing with what needs to be
>>>>>>>> done,
>>>>>>>> but
>>>>>>>>  I have no idea what to actually check/change or how to go about it.
>>>>>>>> What
>>>>>>>>  should I do next?
>>>>>>
>>>>>> Forget running mythbackend etc. - instead go straight to a shell
>>>>>> prompt
>>>>>> on the backend box and try the following command:
>>>>>>
>>>>>> $ mysql -u mythtv -p -h MythBox mythconverg
>>>>>>
>>>>>> When prompted for the password use the same value from
>>>>>> ~/.mythtv/config.xml.
>>>>>>
>>>>>> (if you have used a non-default database name then you need to replace
>>>>>> mythconverg - the correct value is in ~/.mythtv/config.xml too).
>>>>>>
>>>>>> This should fail with the same "Access denied for user
>>>>>> 'mythtv'@'MythBox' (using password: YES)".
>>>>>>
>>>>>> Then readhttp://dev.mysql.com/doc/refman/5.1/en/privilege-system.html
>>>>>> to figure out how to set the user access correctly for your setup and
>>>>>> repeat the mysql command above until it connects OK.
>>>>>>
>>>>>> Once the mysql command successfully connects, then MythTV should be
>>>>>> fine
>>>>>> too.
>>>>>>
>>>>>> Regards,
>>>>>> Jason
>>>>>
>>>>> Thanks for the responses! I'm starting to get somewhere I think.
>>>>>
>>>>> Here are the steps I've taken:
>>>>>
>>>>> 1) Checked that I can log in to phpmyadmin as root. I can.
>>>>>
>>>>> 2) Checked that I can log in to phpmyadmin as mythtv using the password
>>>>> found in ~/.mythtv/config.xml. I can
>>>>>
>>>>> 2) Ran:
>>>>> mysql -u mythtv -p -h MythBox mythconverg
>>>>> and got:
>>>>> Access denied for user 'mythtv'@'MythBox' (using password: YES)
>>>>>
>>>>> 3) Logged into phpmyadmin as root and went to the privileges section.
>>>>> I could see 2 mythtv users in there. One had the host '%' and one had
>>>>> the
>>>>> host 'localhost' (neither had the host 'MythBox').
>>>>> Both just had 'Usage' listed under privilages, so I edited them and
>>>>> clicked
>>>>> on 'Check All' to grant all privilages.
>>>>
>>>> The password field on the entry with % (that is a SQL wildcard)
>>>> probably has a diferent password than the localhost entry ?  You can
>>>> either cut and paste from the localhost entry into the % entry in
>>>> phpmyadmin, or change it from the sql command line like previously
>>>> posted.
>>>
>>>
>>> Thanks for that Greg,
>>>
>>> In phpmyadmin, I have entered the mythtv password everywhere that I can
>>> enter it relating to the mythtv@% user (ie, reset the password to the one
>>> I
>>> know was right before the upgrade) and granted all access. I have also
>>> added
>>> mythconverg specific privileges specifically and granted all access.
>>>
>>> Do I have to add Table-specific privileges?
>>>
>>> mysql -u mythtv -p -h MythBox mythconverg
>>>
>>> still wont let me in.
>>>
>>> Anything else I can try?
>>>
>>>
>>>>
>>>>> I was hopeful that this would work, but:
>>>>> mysql -u mythtv -p -h MythBox mythconverg
>>>>> still returned:
>>>>> Access denied for user 'mythtv'@'MythBox' (using password: YES)
>>>>>
>>>>> Do I need to set up another user with 'MythBox' as the host?
>>>>
>>>> No - The '%' is everywhere
>>>>
>>>>> Sorry if phpmyadmin is looked down on, but it's a lot more user
>>>>> friendly
>>>>> than the command line. I love the comand line when I know what I'm
>>>>> doing,
>>>>> but not when I don't.
>>>>>
>>>>> What should I do next?
>>
>> I'm not very familiar with phpmyadmin.  It probably did not do a flush
>> privileges since you just pasted the password in, so...
>>
>> mysql -u root -p mythconverg
>> grant all on mythconverg.* to mythtv@"%" identified by "mythtv";
>> grant all on mythconverg.* to mythtv@"localhost" identified by "mythtv";
>> flush privileges;
>>
>> use mysql;
>> update user set Password=PASSWORD('mythtv') WHERE user='mythtv';
>> flush privileges;
>> \q
>>
>> That should do it..  You can try to just 'flush privileges' first to
>> make it use the changes made in phpmyadmin regarding the password..
>> Either way, if that still does not work, in /etc/my.conf (changes per
>> distro), mythtv may be setup to only listen on localhost.  I believe
>> it ships that way, but mythtv distros enable the network if you
>> specify more than one machine.  I'm not 100% sure what yours is set to
>> though..
>>
>> http://www.mythtv.org/docs/mythtv-HOWTO-6.html  has good info.
>> -Greg
>>
>>>>> Damian
>>>
>
> I found the my.conf file in /etc/mysql/my.conf
>
> What am i looking for? in there? I did a search for 'localhost' and found
> this.
>
> # Instead of skip-networking the default is now to listen only on
> # localhost which is more compatible and is not less secure.
> bind-address            = 127.0.0.1
> #
>
> Is this the problem?

That needs to be changed to your server's IP and mysql needs to be
restarted.  Then re-run your connection test.

-Greg


More information about the mythtv-users mailing list