Jump to content
The Uniform Server Community

Default table collation problem


nikudza
 Share

Recommended Posts

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.

Link to comment
Share on other sites

Hope the section '9.1.5. Configuring the Character Set and Collation for Applications' at [http://dev.mysql.com/doc/refman/5.5/en/charset-applications.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.

Link to comment
Share on other sites

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:)

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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?..

Link to comment
Share on other sites

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:)

Link to comment
Share on other sites

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:)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...