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

Mike Perkins mikep at randomtraveller.org.uk
Sun Mar 27 20:44:18 UTC 2016


On 27/03/16 21:30, Fred Hamilton wrote:
> Hi,
>
> I've got myth 0.28 working well on the latest xenial beta, except I have to
> manually start mythbackend.  After that it's great.
>
> I looked at the logs and it's clear that the system tries to start it on
> boot about 8 or 9 times before it gives up.  Relevant errors are:
>
> E CoreContext mythdbcon.cpp:229 (OpenDatabase) [DBManager0] Unable to
> connect to database!
>
> E CoreContext mythdbcon.cpp:230 (OpenDatabase) Driver error was
> [1/1045]:#012QMYSQL: Unable to connect#012Database error was:#012Access
> denied for user 'mythtv'@'localhost' (using password: YES)
>
> So apparently I can launch it as user 'fred', but it can't connect to the
> database as user 'mythtv'.
>
> 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.

-- 

Mike Perkins



More information about the mythtv-users mailing list