View Full Version : What did I do? mythconverg users table doesn't exist...


kbrunsting
12-30-08, 10:28 PM
I had updated to the latest kernel recently ( I have mythbuntu 8.04 installed ) and finally rebooted today and everything restarted just fine. For kicks I decided to try running the mysqlcheck to see if everything was ok in mysql. For some reason I couldn't get it to work... I stopped mythbackend, tried running mysqlcheck it complained about a password, I stopped/started mysql and finally gave up. I restarted the backend and went to start the frontend and it went to a screen asking to pick my language and the database login info.... it couldn't start the frontend.

I was able to connect to mysql as root and tried looking at the users table for the mythtv user and it said the mythconverg.users table doesn't exist? What did I do?

wnewell
12-30-08, 11:54 PM
Don't know what you did, but you can simply add the table and users, or just reload the mythconverg database. Of course if you reload the db, you'll have to reconfigure everything. Not a big problem unless you have multiple frontends. Might be best anyway in case something else is missing.

waterhead
12-31-08, 12:23 AM
NEVER update a working MythTV system!!!

mythmaster
12-31-08, 12:44 AM
Exactly. What you did was "update" a working system. Now's a good time to go with 8.10. :)

kbrunsting
12-31-08, 07:14 AM
very strange.... I have no idea what I could have done for that table to disappear... it does look like all the other tables are still there.

mythmaster
12-31-08, 09:31 AM
From the mysqlcheck ref page --> http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html :
Caution

It is best to make a backup of a table before performing a table repair operation; under some circumstances the operation might cause data loss. Possible causes include but are not limited to filesystem errors.

So, apparently, this is what happened. Assuming nothing else got messed up in mythconverg, you should be able to add the mythtv user again. If it were me, though, I'd drop the database and start with a fresh one. And since I was starting with a fresh db, I'd take the opportunity to go ahead and upgrade to 8.10. That's just me, though -- you may have reasons for sticking with 8.04.

quantumstate
12-31-08, 10:09 AM
I suspect that you ran mysqlcheck while the backend was still running.

And I guess you other guys say don't update from hard experience, but I've done a couple updates to kernel and mythtv.svn without problems. Maybe they've fixed some glitches, and also you gotta stop everything Myth. My most recent svn compile advised that it has to upgrade the database schema, and that went without a hitch.

Scared to death at the moment tho, as they're saying my Seagate 1TB has defective firmware which could cause the drive to wink out. For a long time they said this only applies to the 1.5TB, but now they're saying also the 500GB and 1TB. Can't download the firmware, and of course Seagate is gone for the holidays.

Mac The Knife
12-31-08, 01:31 PM
^^^ I've had a 500GB Seagate for about a year now and have beat the hell out of it without it having any problems (knock on wood).

I've probably run 3TB of data through it so far since it's used to store HD captures and DVD rips until I get around to watching them.

quantumstate
12-31-08, 01:51 PM
I've been a Seagate acolyte for a long time, but check this:
http://www.avsforum.com/avs-vb/showthread.php?p=15423940

I've read the major threads on AVS and Seagate forums, and there is indeed a serious problem with the 7200.11 class of drives. I've just ordered a Seagate 1.5TB for backups, and when the 1TB fails I'll get it replaced and sell it for another 1.5TB to build RAID.

May even return it before then. May rebuild anew with Hardy, as I hate KDE4... too limited.

mythmaster
12-31-08, 02:17 PM
A 7200.11 fell out of my 3-disk raid0, but I just thought it might have been underpowered, so I haven't bothered to RMA it yet. Good to know that I'm not alone and that I don't really need to buy another PSU.

quantumstate
12-31-08, 02:22 PM
Eh, you'd better get a new one in there right away kimosabe, as if either of the remaining go you lose your whole striped set.

mythmaster
12-31-08, 02:30 PM
meh. It'll give me a chance to play with OSx86 and opensolaris. :)

newlinux
12-31-08, 02:44 PM
Do you have a backup of your mythconverg db? If not, I'd vote for just redoing it if it isn't too much work - and then doing regular backups.

I'm too chicken to keep upgrading. Scarred from past experiences. All were fixable, but now I have too many machines to troubleshoot with upgrades, so I just keep one of my laptops upgraded to latest packages and versions of ubuntu, and my primary desktop keeps updated on the latest packages, but it is still on 8.04 (mint elyssa, but I only update the ubuntu packages after I had some problems with flash with the mint packages).

kbrunsting
12-31-08, 03:39 PM
I was thinking of having a friend of mine send me the sql to recreate the users table to see if that works. I was hoping to stay on 8.04 just because that version of Ubuntu is the LTS one. I'm not completely opposed to wiping out the database... I've watched all the shows on there.... just resetting up all the options would be a pain.

mythmaster
12-31-08, 04:10 PM
I was thinking of having a friend of mine send me the sql to recreate the users table to see if that works. I was hoping to stay on 8.04 just because that version of Ubuntu is the LTS one. I'm not completely opposed to wiping out the database... I've watched all the shows on there.... just resetting up all the options would be a pain.
CREATE DATABASE IF NOT EXISTS mythconverg;
GRANT ALL ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv";
FLUSH PRIVILEGES;
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv";
FLUSH PRIVILEGES;
ALTER DATABASE mythconverg DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

kbrunsting
12-31-08, 04:54 PM
Should the character set be utf8 or latin1? there's an mc.sql file that shows latin1 instead.

So is the users table part of the mythconverg database or is that part of mysql? I run the grants listed above and it says 0 rows affected.

mythmaster
12-31-08, 05:23 PM
Should the character set be utf8 or latin1? there's an mc.sql file that shows latin1 instead.

So is the users table part of the mythconverg database or is that part of mysql? I run the grants listed above and it says 0 rows affected.

That is the mc.sql from svn, so I'd stick with utf8. From wikipedia --> http://en.wikipedia.org/wiki/UTF-8:
UTF-8 (8-bit UCS/Unicode Transformation Format) is a variable-length character encoding for Unicode. It is able to represent any character in the Unicode standard, yet the initial encoding of byte codes and character assignments for UTF-8 is backwards compatible with ASCII. For these reasons, it is steadily becoming the preferred encoding for e-mail, web pages,[1] and other places where characters are stored or streamed.
"0 rows affected" is the correct response for grants. Not 100% sure about the users table. I think mysql takes care of this when you set the grants and mythtv connects.

EDIT: make sure that your db password in mythtv and in the sql above (identified by) match.

kbrunsting
12-31-08, 06:12 PM
ok, I'm getting closer... I tried running these

sudo dpkg-reconfigure mythtv-database
sudo dpkg-reconfigure mythtv-common

and it seemed to have restored the relationship between the mythconverg and mysql databases and things seem able to login to mythconverg now, but now the frontend is saying it can't connect to the backend... now I must have screwed something else up.

kbrunsting
12-31-08, 06:16 PM
spoke too soon.... although the frontend comes up now. I still can't connect to mythconverg as mythtv user.

mythmaster
12-31-08, 06:34 PM
In the frontend, go to Utilities/Setup|Setup|General and verify that the password is the same that you used in the sql "identified by" that you used. Also, verify that mythbackend is running:
sudo /etc/init.d/mythtv-backend restart

kbrunsting
12-31-08, 06:44 PM
ok, everything was working except the backend couldn't connect to the database, it gave the error

No UPnP backends found

Would you like to configure the database connection now? [yes]

and tried to set itself up again... so I tried these statements to reset the password:

mysql -u root mythconverg
set password for 'mythtv'@'%' = password('mypassword');
set password for 'mythtv'@'localhost' = password('mypassword');
flush privileges;

now the backend can start, but the frontend doesn't... it tries to launch the graphical database reconfigure screen.

Is this related to the backend running as mythtv and the frontend running as my user?

mythmaster
12-31-08, 06:48 PM
now the backend can start, but the frontend doesn't... it tries to launch the graphical database reconfigure screen.

Is this related to the backend running as mythtv and the frontend running as my user?
No. Did you go through the reconfigure?

kbrunsting
12-31-08, 07:02 PM
This keeps on getting stranger... I did run the reconfigures again.

And now from the backend logs it seems to be connecting to the database but now the capture cards are busy?

2008-12-31 19:58:40.621 Connected to database 'mythconverg' at host: localhost
2008-12-31 19:58:40.623 New DB connection, total: 2
2008-12-31 19:58:40.624 Connected to database 'mythconverg' at host: localhost
2008-12-31 19:58:40.626 Current Schema Version: 1214
Starting up as the master server.
2008-12-31 19:58:40.632 DVBChan(1:0) Error: Opening DVB frontend device failed.
eno: Device or resource busy (16)
2008-12-31 19:58:40.633 DVBChan(2:1) Error: Opening DVB frontend device failed.
eno: Device or resource busy (16)
ERROR: no valid capture cards are defined in the database.
Perhaps you should read the installation instructions?
QServerSocket: failed to bind or listen to the socket
2008-12-31 19:58:40.658 MediaServer::HttpServer Create Error
2008-12-31 19:58:40.659 mythbackend version: 0.21.20080304-1 www.mythtv.org
2008-12-31 19:58:40.660 Enabled verbose msgs: important general
2008-12-31 19:58:40.661 AutoExpire: CalcParams(): Max required Free Space: 1.0 GB w/freq: 15 min
QServerSocket: failed to bind or listen to the socket
2008-12-31 19:58:40.663 Failed to bind port 6543. Exiting.

mythmaster
12-31-08, 07:08 PM
Sorry, kbrunsting, but it's new year's & I've already started drinking, so I'm gonna have to bow out of this until sometime tomorrow, because I don't want to accidentally steer you in the wrong direction.

Worst case scenario, open up Synaptic and "remove completely" all things mythtv and mysql, remove the mythtv directory (rm -rf ~/.mythtv), and re-install.

PS, while posting this, I just saw your last post, and this seems to be the issue:ERROR: no valid capture cards are defined in the database.
Try running mythtv-setup again and making sure everything is right.

kbrunsting
12-31-08, 07:08 PM
thanks for your help.... have fun.

mythmaster
12-31-08, 07:09 PM
Happy New Year! :D

kbrunsting
01-01-09, 10:01 AM
I fixed everything in 2 minutes this morning..... I kept going back to the password and how it just looked right, but as I was trying to fall asleep last night I wasn't quite sure. So this morning I compared a printout of my password to the one showing up on the screen and for some reason the last letter in the myth password was an uppercase K, and the one in my notes was lowercase.... fixed. Unbelievable on how that got changed.

mythmaster
01-01-09, 10:01 AM
Were you able to get this going?

mythmaster
01-01-09, 10:03 AM
Wow. Talk about a simulpost!

Good to hear it's working now. :)

kbrunsting
01-01-09, 10:18 AM
actually it seems more likely that I wrote it down wrong and now that I'm setting everything to the same one, things are working again.