[mythtv-users] Resetting mysql password for mythtv user

Mike Perkins mikep at randomtraveller.org.uk
Sun Nov 13 17:04:16 UTC 2016


On 13/11/16 13:24, Simon Waldman wrote:
> Hi list,
>
> I recently reinstalled my MythTV machine (it was easier, with my limited
> knowledge, than fixing everything that was broken from a number of upgrades
> over the years).
>
> Foolishly, I forgot to write down the database password before I did this -
> so the new Mythbuntu installation has put a new password in config.xml, and
> hence when I restored my old db the password was incorrect.
>
> https://www.mythtv.org/wiki/Category:MySQL has instructions for resetting
> the db password. However, I think this is out of date - because the "user"
> table in my new install doesn't have a "password" field. I've also noticed
> that somehow my db has two users called "mythtv", which doesn't sound like
> a good thing:
>
> mysql> select User from user;
> +------------------+
> | User             |
> +------------------+
> | mythtv           |
> | debian-sys-maint |
> | mysql.sys        |
> | mythtv           |
> | root             |
> +------------------+
> 5 rows in set (0.00 sec)
>
>
> So, two questions - and sorry if these are more MySQL questions than MythTV
> ones:
>
> 1. Should I remove one of these users? If so, how? And how to tell which
> one?
>
> 2. How can I reset the password for the user that is left?
>
> Thanks for any help
> SImon.
>
You have just selected a single field from the user table with your query. Try:

select * from user;

and you will see all the fields in that table. This may help you discover what you have done.

If you then need to delete a user, you may find that a combination of fields will be needed to do 
the trick, such as:

delete from user where User="mythtv" and Host="<whatever>";

but CHECK FIRST that you have understood why the user table has ended up this way, before deleting 
anything.

-- 

Mike Perkins



More information about the mythtv-users mailing list