[mythtv-users] Still trying to restore mythconverg database

Michael T. Dean mtdean at thirdcontact.com
Thu Nov 13 20:33:00 UTC 2008


On 11/13/2008 03:10 PM, Damian wrote:
> Michael T. Dean wrote:
>   
>> On 11/13/2008 11:07 AM, Damian wrote:
>>     
>>> Thanks for the replies to my question. I tried a few different things 
>>> and nothing seemed to work
>>>       
>> I /really/ would love to have seen the error messages you claim to have 
>> gotten from the restore script.
...
> Sorry for not replying to your message. I wasn't trying to avoid your 
> request of sending information. I had just gone through a clean install 
> and didn't want to mess anything up so didn't run your script again.
>
> I think the message I was getting was it wanting the path of the 
> database, but I was under the impression that it would automatically 
> find the database if it was in a default place so I got scared and left 
> it alone. I'm not very brave when it comes to mysql as it's the only 
> part of MythTV that still manages to bite me in the ass and leave me 
> scratching my head occasionally. I'm not sure if I tried the script on 
> this current instal or on a previous install or the os, but if there's a 
> log anywhere I'll hapily send it to you.

It doesn't log output, just outputs to stdout/stderr (i.e. the console 
or whatever).

>  Just tell me where to look. 
> There's probably nothing wrong with your script, it was just a bit too 
> complicated for me.
>   

OK.  Thanks.  I was concerned there was a bug and really wanted to fix 
it, but it sounds like I just need to finish documenting it.

>>>  until I found the post that worked for me last time. Maybe Mythbuntu 
>>> works a bit differently to everything else, but this is the only thing 
>>> that has worked for me and it's worked twice now so I'll post it here 
>>> for reference:
>>>
>>> http://www.uluga.ubuntuforums.org/showpost.php?p=2298778&postcount=4
>> ...
>>>  restore your DB:
>> ...
>>>     Code:
>>>
>>>     mysql> DROP DATABASE mythconverg;
>>>     mysql> create database mythconverg;
>>>     mysql> exit
>> And here the instructions are completely wrong.  The instructions fail 
>> to tell you to run mc.sql, which configures the database for MythTV.  If 
>> your MySQL is set up to use utf8 by default, then after following these 
>> instructions (or, more specifically, failing to follow the proper 
>> instructions) your database may be in a state that makes upgrade to 0.22 
>> impossible without losing a large amount (possibly /all/) of your data.
>>     
> This is a concern to me. Everything seemed to go fine both times that I 
> have done this, but I obviously would rather not screw everything up 
> when I next upgrade. Is there any way of me checking what's going on to 
> make sure it's all ok?
>   

The mc.sql script has the instructions:

CREATE DATABASE if not exists mythconverg;
GRANT ALL ON mythconverg.* TO mythtv at localhost IDENTIFIED BY "mythtv";
FLUSH PRIVILEGES;
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv at localhost 
IDENTIFIED BY "mythtv";
FLUSH PRIVILEGES;
ALTER DATABASE mythconverg DEFAULT CHARACTER SET latin1;

These instructions /must/ be executed to ensure that your database is 
properly configured.  The most important part for the 0.22 upgrade being 
the last line that sets the character set to latin1.  The upgrade to 
0.22 requires switching the character set and if any part of your 
database is configured with an incorrect character set, the upgrade will 
not succeed.  The 0.22 upgrade will cause a /lot/ of people to realize 
they have broken databases--it will be unlike any other database upgrade 
we've ever had.

If nothing else, you should run that command on your database, now.  
Doing so would prevent future problems.  However, depending on what 
happened during the restore, the existing schema/data may already be 
broken, and you won't know for sure until you try to upgrade to 0.22.  
(While it's possible to verify your schema manually, my MySQL-fu isn't 
quite at the necessary level to guide you through the process, and 
besides, I don't have the time to document the 50-100 tables (might 
still have old tables from old schema versions) and their associated 
columns.)

I'd recommend redoing everything, but rather than run the "create 
database" line, run mc.sql (or each line in it), then do the restore.  
But, then again, to me, the data in the mythconverg database is the 2nd 
most important piece of data on any of my 11 computers + laptop, so I'm 
a bit obsessive.

> The only issue I've got at the moment is that only my user seems to be 
> working. Other users on the same system and other frontends seem to be 
> having trouble connecting and saying that there's no pin number set or 
> something. I'll have to work out what's going on there.

That's a MySQL permissions issue.  See 
http://mythtv.org/docs/mythtv-HOWTO-6.html#ss6.2 .

Mike


More information about the mythtv-users mailing list