store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Sat May 25, 2013 8:26 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 9 posts ] 
Author Message
 Post subject: plesk mysql databases...
Unread postPosted: Mon Apr 12, 2010 2:22 pm 
Offline
Forum Regular
Forum Regular

Joined: Thu Apr 23, 2009 12:08 pm
Posts: 218
This is a new server default installation from 1and1...plesk 9.3...the restore functions do not replace the databases...plesk forum response from them refers the latin to utf8 conversion possibility
Quote:
keys in Latin1 in Joomla databases which will be incorrectly converted to UTF8,


Yet upon inspection I find that the default plesk databases:
Code:
horde....latin1_swedish
mysql....latin1_swedish
phpmyadnin...latin1_swedish
psa....latin1_swedish
tortix....latin1_swedish


Whereas the new databases created for new domains through the plesk admin interface are ALL...utf8_general_ci

Is this unusual...is this a problem?
Are all my backups/restores bad because of these plesk database inconsistencies????
Should I convert all to utf8_general or leave alone?


Top
 Profile  
 
 Post subject: Re: plesk mysql databases...
Unread postPosted: Tue Apr 13, 2010 10:42 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 1846
All our 8.6 databases are latin1_swedish by default.

I have no ideas of the implications I'm afraid.

Faris.

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
 
 Post subject: Re: plesk mysql databases...
Unread postPosted: Wed Apr 14, 2010 2:31 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Apr 10, 2006 12:55 pm
Posts: 656
The problem you'll run into with latin character sets is that most web pages are UTF8 encoded. mysql doesn't play nice in trying to convert them so, sometimes, you'll have characters run amok when they come into the database from UTF8. It's best to have your websites and databases use the same encoding. utf8_general is faster but doesn't support international character sets. utf8_unicode will support them all but is slower in doing so.

_________________
"Its not a mac. I run linux... I'm actually cool." - scott


Top
 Profile  
 
 Post subject: Re: plesk mysql databases...
Unread postPosted: Wed Apr 14, 2010 3:45 pm 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 1846
Hmmm.... any tips on converting en-mass, and is anything likely to go wrong in doing so?

I think the latin1_swedish is something that was used as the default in Plesk going way way back. For speed reasons, I guess?

Faris.

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
 
 Post subject: Re: plesk mysql databases...
Unread postPosted: Wed Apr 14, 2010 5:17 pm 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Sat Aug 20, 2005 9:30 am
Posts: 2812
Location: The Netherlands
I believe latin1_swedish is still MySQL's default collation, which is used when no collation is specified. At some point Plesk was probably changed to create databases using utf8_general_ci.

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
 
 Post subject: Re: plesk mysql databases...
Unread postPosted: Thu Apr 15, 2010 4:28 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Jul 15, 2008 2:38 pm
Posts: 704
Location: Sweden
breun wrote:
I believe latin1_swedish is still MySQL's default collation, which is used when no collation is specified. At some point Plesk was probably changed to create databases using utf8_general_ci.


The Swedish heritage I'd guess... 8)


Top
 Profile  
 
 Post subject: Re: plesk mysql databases...
Unread postPosted: Thu Apr 15, 2010 12:50 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Apr 10, 2006 12:55 pm
Posts: 656
This has really only started being an issue in the last few years as 5.0 uses utf8_general as its default rather than swedish plus more and more webpages use utf8 as their default now, rather than windows-latin or ASCII. I seriously doubt Plesk or any other application actually specified a character set in their database creation.

Can you change it en masse? Somewhat. The danger is double encoding. Let's say you bring in utf8 data to latin1. Mysql will translate it into latin1 which is where the problem is in the first place. So when you change it to utf8 it now takes gobbledygook and converts it into gibberish. In other words, the cure can be worse than the problem.

There's no perfect way that I've found to do it. I'm still rolling data myself as I get time but it requires changing the collation of each field and then the table itself. It's safe about 99% of the time. You'll know it did something funky when you see the weird diamond question mark in your browser. In most of those cases it was one of those #%@& MS Word quotes that came in but it's also sometimes just a simple tick mark ( ' ).

Is it worth it? Mostly this is necessary when you see oddball characters pop into your data. I had a Canadian checkout that tipped me to this problem. YMMV. If you're not seeing any problems it doesn't hurt to stay put, just realize that new tables will be made in utf8 unless you set mysql to use latin1.

_________________
"Its not a mac. I run linux... I'm actually cool." - scott


Top
 Profile  
 
 Post subject: Re: plesk mysql databases...
Unread postPosted: Thu Apr 15, 2010 1:06 pm 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 1846
Thanks Highland -- that's very informative and has put my mind at rest.

Faris.

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
 
 Post subject: Re: plesk mysql databases...
Unread postPosted: Thu Apr 15, 2010 2:17 pm 
Offline
Forum Regular
Forum Regular

Joined: Thu Apr 23, 2009 12:08 pm
Posts: 218
Yes, possibly not the core issue for my problems with the plesk backups and restore failures... the plesk people threw this at me when I queried about consistent lack of restores with the databases...so, they were implying the possibility of imported databases not working or something like that...

Thanks for all the info...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 9 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group