Jump to content


Photo

Default table collation problem


  • Please log in to reply
8 replies to this topic

#1 nikudza

nikudza

    Junior Member

  • Member
  • Pip
  • 11 posts
  • Main OS: Windows 7

Posted 17 January 2011 - 01:26 PM

Hi!
Got a problem, and I guess it is SQL problem (I'm not experienced at all, so I might be wrong).
The problem is: in previous version of Uniserver (5.6.16) the default collation was utf8_general_ci, which was good and helpful (I had nothing to change). And now, in 5.7.1 SUDDENLY it changed to latin1_swedish_ci, and it messed up all my tables. I know it is possible to restore everything and all, but maybe there any way to change default collation? Or maybe I misunderstand something at all?
Oh, almost forgot - I'm Russian speaking and I use Russian language in my tables.

#2 Shyokou Ouyou

Shyokou Ouyou

    Member

  • Member
  • PipPip
  • 72 posts
  • Main OS: Windows XP

Posted 18 January 2011 - 02:24 AM


Hope the section '9.1.5. Configuring the Character Set and Collation for Applications' at [http://dev.mysql.com...lications.html] can be helpful ...


Hi!
Got a problem, and I guess it is SQL problem (I'm not experienced at all, so I might be wrong).
The problem is: in previous version of Uniserver (5.6.16) the default collation was utf8_general_ci, which was good and helpful (I had nothing to change). And now, in 5.7.1 SUDDENLY it changed to latin1_swedish_ci, and it messed up all my tables. I know it is possible to restore everything and all, but maybe there any way to change default collation? Or maybe I misunderstand something at all?
Oh, almost forgot - I'm Russian speaking and I use Russian language in my tables.



#3 nikudza

nikudza

    Junior Member

  • Member
  • Pip
  • 11 posts
  • Main OS: Windows 7

Posted 18 January 2011 - 02:57 AM

Thank you, Shyokou Ouyou, I read the section you've advised and probably it would be helpful if I knew some more, but I'm just learning, so...
See, as I understand, "to select a character set and collation when you configure and build MySQL from source" - that's what I need in my case, right?
But I don't build anything, it is already built and built in Uniserver, so I can't change and configure anything on that level. Or... can I?

And also the issue was that the default charset and collation have changed from version 5.6.16 to 5.7.1, and I have never had that kind of problem before, in previous versions of Uniserver. Is it going to be fixed (changed back to utf8) in next versions?

I'm really a newbie, forgive me if I say something stupid. Just want to solve the problem:)

#4 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 18 January 2011 - 05:13 AM

Hi nikudza try the following.

Navigate to folder: UniServer\usr\local\mysql
Edit file: my.ini

Change this section:
[mysqld]

port=3306
server-id = 1
pid-file=mysql.pid
default-storage-engine=MYISAM
skip-external-locking
To the following:
[mysqld]

port=3306
server-id = 1
pid-file=mysql.pid
character-set-server=utf8
default-storage-engine=MYISAM
skip-external-locking

All the best
Ric :)

#5 nikudza

nikudza

    Junior Member

  • Member
  • Pip
  • 11 posts
  • Main OS: Windows 7

Posted 18 January 2011 - 05:49 AM

2 Ric
OMG it's simply MAGIC! It did work!!!
Thank you so much, appreciate your really fast help!
Hope this solution will work further. And why would you change this setting at all?..

#6 Shyokou Ouyou

Shyokou Ouyou

    Member

  • Member
  • PipPip
  • 72 posts
  • Main OS: Windows XP

Posted 18 January 2011 - 08:28 PM


Do you like to overlook the easy guide and challenge yourself with something tougher :-)

What you quoted, in subsection "Specify character settings at MySQL configuration time", is just two paragraphs away from what Ric recommended ...


Thank you, Shyokou Ouyou, I read the section you've advised and probably it would be helpful if I knew some more, but I'm just learning, so...
See, as I understand, "to select a character set and collation when you configure and build MySQL from source" - that's what I need in my case, right?
But I don't build anything, it is already built and built in Uniserver, so I can't change and configure anything on that level. Or... can I?

And also the issue was that the default charset and collation have changed from version 5.6.16 to 5.7.1, and I have never had that kind of problem before, in previous versions of Uniserver. Is it going to be fixed (changed back to utf8) in next versions?

I'm really a newbie, forgive me if I say something stupid. Just want to solve the problem:)



Again in the previous doc section, the first statement is the truth you may have overlooked ;-)

RTFM is a never out-of-fashion word to nobody ...


2 Ric
OMG it's simply MAGIC! It did work!!!
Thank you so much, appreciate your really fast help!
Hope this solution will work further. And why would you change this setting at all?..



#7 nikudza

nikudza

    Junior Member

  • Member
  • Pip
  • 11 posts
  • Main OS: Windows 7

Posted 19 January 2011 - 10:42 AM


Do you like to overlook the easy guide and challenge yourself with something tougher :-)

What you quoted, in subsection "Specify character settings at MySQL configuration time", is just two paragraphs away from what Ric recommended ...

Again in the previous doc section, the first statement is the truth you may have overlooked ;-)

RTFM is a never out-of-fashion word to nobody ...

That's true, it is always a good word:)

But, in my defenсe, see:
1. I was looking for the most efficient way of changing the setting I needed, and "Specify character settings at MySQL configuration time" seemed the best to me, for it changes it once and forever, not every time I run the server. Maybe I was wrong. And anyway, I didn't know how to do that.
2. I found the file name "my.ini" on that page only once, in comments, and never found the path "UniServer\usr\local\mysql". Probably I'm supposed to know that by default but I do not yet, sorry.
3. Even if what Ric recommended wasn't exactly what I was looking for (I guess it was "Specify character settings at server startup"), it still helped, and if Ric - the developer - recommends something, it leaves no doubt that's the right way.
4. Weak exculpation, but I'm Russian speaking, and even cursory inspection of that page was already quite a challenge for me, and even writing this post took me about half an hour:)

But thank you anyway for your time and trying to help, I appreciate that a lot!
And in the future I will do my best to extract information from TFMs:)

#8 Shyokou Ouyou

Shyokou Ouyou

    Member

  • Member
  • PipPip
  • 72 posts
  • Main OS: Windows XP

Posted 20 January 2011 - 12:00 AM


Well, UniServer is one of those WAMP combos that integrate web develop toolkits together, such that when you want to dig the specific information from the one you are interested in, official manual should be the most accurate source to refer to, as it is distro independent ...

It is possible that neither "configuration time" nor "startup" was clear to you before, but you know them now, right ...


That's true, it is always a good word:)

But, in my defenсe, see:
1. I was looking for the most efficient way of changing the setting I needed, and "Specify character settings at MySQL configuration time" seemed the best to me, for it changes it once and forever, not every time I run the server. Maybe I was wrong. And anyway, I didn't know how to do that.
2. I found the file name "my.ini" on that page only once, in comments, and never found the path "UniServer\usr\local\mysql". Probably I'm supposed to know that by default but I do not yet, sorry.
3. Even if what Ric recommended wasn't exactly what I was looking for (I guess it was "Specify character settings at server startup"), it still helped, and if Ric - the developer - recommends something, it leaves no doubt that's the right way.
4. Weak exculpation, but I'm Russian speaking, and even cursory inspection of that page was already quite a challenge for me, and even writing this post took me about half an hour:)

But thank you anyway for your time and trying to help, I appreciate that a lot!
And in the future I will do my best to extract information from TFMs:)



#9 nikudza

nikudza

    Junior Member

  • Member
  • Pip
  • 11 posts
  • Main OS: Windows 7

Posted 20 January 2011 - 12:34 AM


It is possible that neither "configuration time" nor "startup" was clear to you before, but you know them now, right ...

Exactly, at least I hope I do. And I also hope I get it right:)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users