Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

Error when changing Mythtv's mysql database from utf8 to latin1 on Gentoo

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


mythtv-users at gorbag

Nov 11, 2009, 8:38 AM

Post #1 of 6 (763 views)
Permalink
Error when changing Mythtv's mysql database from utf8 to latin1 on Gentoo

Hello,

I am using Mythtv 0.21 on Gentoo. Gentoo sets up mysql to use utf8,
but Mythtv prefers it to use latin1. This will cause problems when
Mythtv is upgraded to 0.22. There are instructions on how to fix this at:

http://wiki.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding

I followed these instructions, but got this error when restoring the fixed
backup:

ERROR 1062 (23000) at line 1712: Duplicate entry 'Kathleen ÃôDixieÃö
Dixon*Jane Hazlegr' for key 2

Fortunately it was possible to restore the original, unfixed, backup,
so I have a working mythtv :-)

Does anyone have any idea how to fix the database /without/ getting this
error?

Steve
--
____________________________________________________________________
Steve Evans E-mail: mailto:stevee [at] gorbag
WEB: http://www.gorbag.com
Registered Linux user #217906: http://counter.li.org
Public Encryption Key: http://www.gorbag.com/public-key.html
____________________________________________________________________

Now playing: 'Everything's Gone Green' by 'New Order' from the album 'Factory
Records - Communications 1978-92 - CD2 1981 to 1984'

2.6.30-gentoo-r7 Intel(R) Pentium(R) 4 CPU 3.00GHz GNU/Linux

11:56:33 up 16 days, 20:51, 7 users, load average: 1.92, 0.92, 0.37

From the cradle to the coffin underwear comes first.
-- Bertolt Brecht

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


dliana.mythtv at gmail

Nov 11, 2009, 9:07 AM

Post #2 of 6 (723 views)
Permalink
Re: Error when changing Mythtv's mysql database from utf8 to latin1 on Gentoo [In reply to]

I am a Gentoo user... Here is my understanding of what needs to be done (or
better yet, what I did). I could completely be out in left field, so if
anyone wants to correct me, I can at least restore from a backup.


1. I had the latin1 use flag set for as long as I remember, so it is my
understanding that I would not be, or at worst minimally affected. I
think.
2. I would dump the full database using the mysqldump command[1]
3. Using the mysqldump comand, pullout the important tables (like
recorded, recordeddata, etc.). I think the syntax for this is on the wiki.
I like to set up my hardware and other settings from scratch when I
4. Drop mythconverg.
5. Make a backup of /etc/mysql/my.conf, and replace utf8 with latin1 in
my.cnf. I did not have to do this since everything was latin1.
6. Re-create mythconverg with a charset of latin1.
7. Run mythtv-setup from 0.21, but do not set anything up and exit.
8. Restore you're backup from step 2 or 3, depending on your
preferences. I restored from step 2.
9. Upgrade mythtv, mythtv-themes and your plugins to v0.22.
10. Run mythtv-setup and tweak your settings. It looks like this
upgrades your db to utf8. (I'm assuming this is okay)


[1] http://www.mythtv.org/wiki/Backup_your_database#The_mysqldump_command

On Wed, Nov 11, 2009 at 11:38 AM, Steve Evans <mythtv-users [at] gorbag>wrote:

> Hello,
>
> I am using Mythtv 0.21 on Gentoo. Gentoo sets up mysql to use utf8,
> but Mythtv prefers it to use latin1. This will cause problems when
> Mythtv is upgraded to 0.22. There are instructions on how to fix this at:
>
> http://wiki.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding
>
> I followed these instructions, but got this error when restoring the fixed
> backup:
>
> ERROR 1062 (23000) at line 1712: Duplicate entry 'Kathleen ÃôDixieÃö
> Dixon*Jane Hazlegr' for key 2
>
> Fortunately it was possible to restore the original, unfixed, backup,
> so I have a working mythtv :-)
>
> Does anyone have any idea how to fix the database /without/ getting this
> error?
>
> Steve
> --
> ____________________________________________________________________
> Steve Evans E-mail: mailto:stevee [at] gorbag
> WEB: http://www.gorbag.com
> Registered Linux user #217906: http://counter.li.org
> Public Encryption Key: http://www.gorbag.com/public-key.html
> ____________________________________________________________________
>
> Now playing: 'Everything's Gone Green' by 'New Order' from the album
> 'Factory
> Records - Communications 1978-92 - CD2 1981 to 1984'
>
> 2.6.30-gentoo-r7 Intel(R) Pentium(R) 4 CPU 3.00GHz GNU/Linux
>
> 11:56:33 up 16 days, 20:51, 7 users, load average: 1.92, 0.92, 0.37
>
> From the cradle to the coffin underwear comes first.
> -- Bertolt Brecht
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


mtdean at thirdcontact

Nov 11, 2009, 12:15 PM

Post #3 of 6 (717 views)
Permalink
Re: Error when changing Mythtv's mysql database from utf8 to latin1 on Gentoo [In reply to]

<fixed top posting>

On 11/11/2009 12:07 PM, David Liana wrote:
> On Wed, Nov 11, 2009 at 11:38 AM, Steve Evans wrote:
>
>> I am using Mythtv 0.21 on Gentoo. Gentoo sets up mysql to use utf8,
>> but Mythtv prefers it to use latin1. This will cause problems when
>> Mythtv is upgraded to 0.22. There are instructions on how to fix this at:
>>
>> http://wiki.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding
>>
>> I followed these instructions, but got this error when restoring the fixed
>> backup:
>>
>> ERROR 1062 (23000) at line 1712: Duplicate entry 'Kathleen ÃôDixieÃö
>> Dixon*Jane Hazlegr' for key 2
>>
>> Fortunately it was possible to restore the original, unfixed, backup,
>> so I have a working mythtv :-)
>>
>> Does anyone have any idea how to fix the database /without/ getting this
>> error?
>>
>> Steve
> I am a Gentoo user... Here is my understanding of what needs to be done (or
> better yet, what I did). I could completely be out in left field, so if
> anyone wants to correct me, I can at least restore from a backup.
>
>
> 1. I had the latin1 use flag set for as long as I remember, so it is my
> understanding that I would not be, or at worst minimally affected. I
> think.
> 2. I would dump the full database using the mysqldump command[1]
> 3. Using the mysqldump comand, pullout the important tables (like
> recorded, recordeddata, etc.). I think the syntax for this is on the wiki.
> I like to set up my hardware and other settings from scratch when I
> 4. Drop mythconverg.
> 5. Make a backup of /etc/mysql/my.conf, and replace utf8 with latin1 in
> my.cnf. I did not have to do this since everything was latin1.
> 6. Re-create mythconverg with a charset of latin1.
> 7. Run mythtv-setup from 0.21, but do not set anything up and exit.
> 8. Restore you're backup from step 2 or 3, depending on your
> preferences. I restored from step 2.
> 9. Upgrade mythtv, mythtv-themes and your plugins to v0.22.
> 10. Run mythtv-setup and tweak your settings. It looks like this
> upgrades your db to utf8. (I'm assuming this is okay)
>
>
> [1] http://www.mythtv.org/wiki/Backup_your_database#The_mysqldump_command

There's more to it than that. See
http://www.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding for details.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Nov 11, 2009, 12:16 PM

Post #4 of 6 (721 views)
Permalink
Re: Error when changing Mythtv's mysql database from utf8 to latin1 on Gentoo [In reply to]

On 11/11/2009 11:38 AM, Steve Evans wrote:
> I am using Mythtv 0.21 on Gentoo. Gentoo sets up mysql to use utf8,
> but Mythtv prefers it to use latin1. This will cause problems when
> Mythtv is upgraded to 0.22. There are instructions on how to fix this at:
>
> http://wiki.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding
>
> I followed these instructions, but got this error when restoring the fixed
> backup:
>
> ERROR 1062 (23000) at line 1712: Duplicate entry 'Kathleen ÃôDixieÃö
> Dixon*Jane Hazlegr' for key 2
>

That means you have partial corruption.

> Fortunately it was possible to restore the original, unfixed, backup,
> so I have a working mythtv :-)
>
> Does anyone have any idea how to fix the database /without/ getting this
> error?

You need to follow the instructions at:

http://www.gossamer-threads.com/lists/mythtv/users/406111#406111

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


dliana.mythtv at gmail

Nov 11, 2009, 1:45 PM

Post #5 of 6 (721 views)
Permalink
Re: Error when changing Mythtv's mysql database from utf8 to latin1 on Gentoo [In reply to]

On Wed, Nov 11, 2009 at 3:16 PM, Michael T. Dean <mtdean [at] thirdcontact>wrote:

> On 11/11/2009 11:38 AM, Steve Evans wrote:
>
>> I am using Mythtv 0.21 on Gentoo. Gentoo sets up mysql to use utf8,
>> but Mythtv prefers it to use latin1. This will cause problems when
>> Mythtv is upgraded to 0.22. There are instructions on how to fix this at:
>>
>> http://wiki.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding
>>
>> I followed these instructions, but got this error when restoring the fixed
>> backup:
>>
>> ERROR 1062 (23000) at line 1712: Duplicate entry 'Kathleen ÃôDixieÃö
>> Dixon*Jane Hazlegr' for key 2
>>
>>
>
> That means you have partial corruption.
>
>
> Fortunately it was possible to restore the original, unfixed, backup,
>> so I have a working mythtv :-)
>>
>> Does anyone have any idea how to fix the database /without/ getting this
>> error?
>>
>
> You need to follow the instructions at:
>
> http://www.gossamer-threads.com/lists/mythtv/users/406111#406111
>
> Mike
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

I followed the directions on the posted thread on my end... Started with a
clean v0.21-fixes DB in latin1 charset, upgraded to v0.22, ran the setup...
Will the resulting v0.22 database be utf8?


mtdean at thirdcontact

Nov 11, 2009, 1:52 PM

Post #6 of 6 (706 views)
Permalink
Re: Error when changing Mythtv's mysql database from utf8 to latin1 on Gentoo [In reply to]

On 11/11/2009 04:45 PM, David Liana wrote:
> On Wed, Nov 11, 2009 at 3:16 PM, Michael T. Dean wrote:
>
>> On 11/11/2009 11:38 AM, Steve Evans wrote:
>>
>>> I am using Mythtv 0.21 on Gentoo. Gentoo sets up mysql to use utf8,
>>> but Mythtv prefers it to use latin1. This will cause problems when
>>> Mythtv is upgraded to 0.22. There are instructions on how to fix this at:
>>>
>>> http://wiki.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding
>>>
>>> I followed these instructions, but got this error when restoring the fixed
>>> backup:
>>>
>>> ERROR 1062 (23000) at line 1712: Duplicate entry 'Kathleen ÃôDixieÃö
>>> Dixon*Jane Hazlegr' for key 2
>> That means you have partial corruption.
>>
>>
>> Fortunately it was possible to restore the original, unfixed, backup,
>>
>>> so I have a working mythtv :-)
>>>
>>> Does anyone have any idea how to fix the database /without/ getting this
>>> error?
>>>
>>>
>> You need to follow the instructions at:
>>
>> http://www.gossamer-threads.com/lists/mythtv/users/406111#406111
> I followed the directions on the posted thread on my end... Started with a
> clean v0.21-fixes DB in latin1 charset, upgraded to v0.22, ran the setup...
> Will the resulting v0.22 database be utf8?

Yes. It will go through the normal DB upgrade the first time you run
mythtv-setup.

Once you reconfigure, it will be exactly the same as the database /and/
data you would have had if your 0.21-fixes DB schema weren't
corrupt--except maybe a bit cleaner (as it will get rid of some old
garbage you may have had for old hosts you may have run.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.