[MDEV-6556] Please, add information how to change the default character set and collation into utf8! Created: 2014-08-08 Updated: 2014-09-04 Resolved: 2014-09-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | N/A |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | TImur Fayzrakhmanov | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | documentation | ||
| Environment: |
Ubuntu Server 14.04, MariaDB 10.1.0 |
||
| Attachments: |
|
| Description |
|
I'm sorry for the mistakes I've made - I'm from Russia. As a result: I still can't find the right way to make my mysql service using utf8 character set. Could anybody give the solution that will really work!? |
| Comments |
| Comment by Elena Stepanova [ 2014-08-08 ] | ||||||||||||||
|
Hi Timur, The highest-ranking answer from the link above is correct. In your case, you are missing
and in case you need it for some other clients,
| ||||||||||||||
| Comment by TImur Fayzrakhmanov [ 2014-08-08 ] | ||||||||||||||
|
The result of code above is:
So mysql service starting is fail:
| ||||||||||||||
| Comment by Elena Stepanova [ 2014-08-08 ] | ||||||||||||||
|
Timur, Please note the example above: it must be mysql section, not mysqld section. Please provide a screenshot of your new cnf. | ||||||||||||||
| Comment by TImur Fayzrakhmanov [ 2014-08-08 ] | ||||||||||||||
|
Thank you for elaboration. I've updated my configuration, but the result is not full utf8:
| ||||||||||||||
| Comment by Elena Stepanova [ 2014-08-08 ] | ||||||||||||||
|
You already had character_set_server = utf8 earlier, what's changed? | ||||||||||||||
| Comment by TImur Fayzrakhmanov [ 2014-08-08 ] | ||||||||||||||
|
Good, now it works!
The code above works the same. Is it correct? Ok, I hardly find the solution. Sometimes I think that configuration file is the real mess: some options have names like option_name_foo and other option-name-bar. | ||||||||||||||
| Comment by TImur Fayzrakhmanov [ 2014-08-08 ] | ||||||||||||||
|
It seems like official documentation has no information about default-character-set option.. | ||||||||||||||
| Comment by Elena Stepanova [ 2014-08-08 ] | ||||||||||||||
For your goal, and given that no clients specify the option explicitly, yes, it will be the same.
Apparently it doesn't get a high rank from google, but here it is:
Usually it's just a matter of different preferences of example writers. Pretty much all options can be written either way. Variables always have underscores.
You need to look for client documentation, not server documentation. There is plenty of it in MySQL manual, and you can find some in MariaDB KB, too (see the link above for example). | ||||||||||||||
| Comment by TImur Fayzrakhmanov [ 2014-08-09 ] | ||||||||||||||
|
Thank you for your explanations. They are really helpful. Thus I think information how to change character set must be transparent and should be specified in documentation, for example here: https://mariadb.com/kb/en/mariadb/documentation/data-types/string-data-types/data-types-character-sets-and-collations/setting-character-sets-and-collations/ Why it so bother me? If I have no information how to change the only character set, what be in the future if I need something more complicated? | ||||||||||||||
| Comment by Elena Stepanova [ 2014-08-09 ] | ||||||||||||||
|
I do agree that it's reasonable to have it on this page https://mariadb.com/kb/en/mariadb/documentation/data-types/string-data-types/data-types-character-sets-and-collations/setting-character-sets-and-collations Assigning to Ian. | ||||||||||||||
| Comment by TImur Fayzrakhmanov [ 2014-08-09 ] | ||||||||||||||
|
Good! Thank you again Elena! | ||||||||||||||
| Comment by Ian Gilfillan [ 2014-09-04 ] | ||||||||||||||
|
I have added this as an example to the documentation |