[mythtv-users] database access denied for user 'mythtv'@'localhost' (using password: YES)

R. G. Newbury newbury at mandamus.org
Wed Mar 30 17:02:08 UTC 2016


On 03/27/2016 04:44 PM, Mike Perkins wrote:
> On 27/03/16 21:30, Fred Hamilton wrote:

>> When I list users in mysql, I get:
>> mysql> SELECT user FROM mysql.user;
>> +------------------+
>> | user             |
>> +------------------+
>> | mythtv           |
>> | root             |
>> | root             |
>> | debian-sys-maint |
>> | mythtv           |
>> | root             |
>> +------------------+
>> 6 rows in set (0.00 sec)
>>
>> Is it normal to have 3 root and 2 mythtv users?
>>
>> I imagine I need to change permissions somewhere or add (delete?) users
>> somewhere, but I'm at the end of my very limited understanding, so
>> thought
>> I'd ask here before I start flailing.
>>
> It is the rest of that table you should be interested in. For example,
> the entry you tried was for 'mythtv' from location 'localhost' with a
> particular password. Other entries may exist for 'mythtv' from other
> locations and possibly with other passwords. 'root' entries will work on
> the same principle.
>
> You can create entries with wild cards to make your life easier; I refer
> you to the appropriate mysql documentation.
>
> The first thing I would check is which config.xml file is being used and
> if the password in that is the correct one. One thing Ubuntu (and
> derivatives) is known for is inventing a new mysql database password on
> installation. Make sure that what you have corresponds.

Further to Mike's reply, we really need to see:
mysql> select host,user,password from mysql.user

That will tell you what user:host combinations exist (and if the 
passwords are the same for some of them).

Three entries for root are quite possible: localhost, 127.0.0.1 and the 
actual hostname. (Mysql does not "do" DNS lookups, so it thinks these 
are different places, although they resolve to the same place internally 
(to thecomputer, externally to mysql).

Geoff



More information about the mythtv-users mailing list