Cannot login to database

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

pinnerite
Senior
Posts: 256
Joined: Mon Apr 07, 2014 2:34 pm
Great Britain

Re: Cannot login to database

Post by pinnerite »

I ran:
sudo rm -rf /root/.mythtv

I tried:
mysql --host=localhost --password=hFclugQ7 --user=mythtv mythconverg
but it didn't work.
For the record, athough
mysql -u root mysql
ran OK from a root prompt, it doesn't from a user prompt.

$ locate -b '\mythtv-setup.real
just returned a >
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Cannot login to database

Post by bill6502 »

That's progress, sort of. As long as: mysql --host=localhost --password=hFclugQ7 --user=mythtv mythconverg
fails, MythTV won't work. I assume ERROR 1045 error was returned.

Login to mysql as above with the root user and run the SELECT command I've
pasted earlier. There should be entries for user: mythtv, host: localhost and the
encrypted password is: *7FA1620D3146D72F71829062F6BB3227017130A9

We can forget about the locate command for now. I missed the trailing '
character when I cut it.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Cannot login to database

Post by bill6502 »

If the password in SQL is: *CC8F35F587CA5A556B4132C2407E556D92172FFC
then config.xml's password would be: mythtv
pinnerite
Senior
Posts: 256
Joined: Mon Apr 07, 2014 2:34 pm
Great Britain

Re: Cannot login to database

Post by pinnerite »

Not quite what you had hoped for I'm afraid:

root@origen:# mysql --user=root --password mysql --host=localhost --execute="SELECT Host,User,Password FROM user ORDER BY User,Host"
Enter password:
+------------------+--------+-------------------------------------------+
| Host | User | Password |
+------------------+--------+-------------------------------------------+
| % | mythtv | *CC8F35F587CA5A556B4132C2407E556D92172FFC |
| 192.168.0.5 | mythtv | *CC8F35F587CA5A556B4132C2407E556D92172FFC |
| localhost | mythtv | *CC8F35F587CA5A556B4132C2407E556D92172FFC |
| localhost | root | |
+-----------------+---------+-------------------------------------------+
root@origen:~#
pinnerite
Senior
Posts: 256
Joined: Mon Apr 07, 2014 2:34 pm
Great Britain

Re: Cannot login to database

Post by pinnerite »

I couldn't resist:

root@origen:~# locate -b '\mythtv-setup.real'
/timeshift/snapshots/2019-02-21_20-00-01/localhost/usr/bin/mythtv-setup.real
/timeshift/snapshots/2019-02-22_20-00-01/localhost/usr/bin/mythtv-setup.real
/timeshift/snapshots/2019-02-23_20-00-01/localhost/usr/bin/mythtv-setup.real
/timeshift/snapshots/2019-02-24_20-00-01/localhost/usr/bin/mythtv-setup.real
/usr/bin/mythtv-setup.real
root@origen:~#
pinnerite
Senior
Posts: 256
Joined: Mon Apr 07, 2014 2:34 pm
Great Britain

Re: Cannot login to database

Post by pinnerite »

I missed your second message about the password.
I edited config.xml in both locations. (they are not linked) to replace the password with 'mythtv' and could get into the backend setup.

I could then get to the backend setup but could not save the capture card setting.

I then cheated and restored restored a mythconverg backup.
All my settings seem to have come back but I still get the 'Cannot find the database screen' but at least it is in Mythtv-setup's screen.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Cannot login to database

Post by bill6502 »

As before, you need to attach logs and the command line (or menu selection) you're
using. Hopefully, you're not running the setup program as root (as you've properly
removed its .mythtv directory.) This is really a new thread, the login problem is
solved.
pinnerite
Senior
Posts: 256
Joined: Mon Apr 07, 2014 2:34 pm
Great Britain

Re: Cannot login to database

Post by pinnerite »

Thank you for your patience. It is much appreciated.
Post Reply