Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6556

Please, add information how to change the default character set and collation into utf8!

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • N/A
    • None
    • Ubuntu Server 14.04, MariaDB 10.1.0

    Description

      I'm sorry for the mistakes I've made - I'm from Russia.
      May be it is not right place to post this issue but still. The problem is that many people (personally know two people besides me) face the problem of changing the default character set from latin1 to utf8.
      The most popular resource for solving this problem is http://stackoverflow.com/questions/3513773/change-mysql-default-character-set-to-utf-8-in-my-cnf.

      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!?
      I attached the screenshot of my server where mysql/my.cnf on left side and the result on right side.

      Attachments

        Activity

          elenst Elena Stepanova added a comment - - edited

          The code above works the same. Is it correct?

          For your goal, and given that no clients specify the option explicitly, yes, it will be the same.
          You can even keep all 3 of them (I mean character_set_client in mysqld section and default-character-set in mysql/client section, they are not mutually exclusive. skip-character-set-client-handshake disables the latter two).

          It seems like official documentation has no information about default-character-set option..
          http://goo.gl/k21Mvn

          Apparently it doesn't get a high rank from google, but here it is:
          https://mariadb.com/kb/en/mariadb/documentation/clients-and-utilities/mysql-client/mysql-command-line-client/

          Sometimes I think that configuration file is the real mess: some options have names like option_name_foo and other option-name-bar.

          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.

          One more point, I've tried to find configuration's options under client or mysql sections in official documentation but get nothing. Is it so obvious that under these section there are options like default-character-set=utf8?

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

          elenst Elena Stepanova added a comment - - edited The code above works the same. Is it correct? For your goal, and given that no clients specify the option explicitly, yes, it will be the same. You can even keep all 3 of them (I mean character_set_client in mysqld section and default-character-set in mysql / client section, they are not mutually exclusive. skip-character-set-client-handshake disables the latter two). It seems like official documentation has no information about default-character-set option.. http://goo.gl/k21Mvn Apparently it doesn't get a high rank from google, but here it is: https://mariadb.com/kb/en/mariadb/documentation/clients-and-utilities/mysql-client/mysql-command-line-client/ Sometimes I think that configuration file is the real mess: some options have names like option_name_foo and other option-name-bar. 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. One more point, I've tried to find configuration's options under client or mysql sections in official documentation but get nothing. Is it so obvious that under these section there are options like default-character-set=utf8? 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).

          Thank you for your explanations. They are really helpful.
          Be that as it may, if I didn't ask the question I would never guessed the right way of doing it. From my opinion, you shouldn't deny that solution isn't obvious. If it was so obvious then there is no so many question about that.

          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?

          hangglide TImur Fayzrakhmanov added a comment - Thank you for your explanations. They are really helpful. Be that as it may, if I didn't ask the question I would never guessed the right way of doing it. From my opinion, you shouldn't deny that solution isn't obvious. If it was so obvious then there is no so many question about that. 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?
          elenst Elena Stepanova added a comment - 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.

          Good! Thank you again Elena!
          Спасибо Лен) Какой раз уже сталкиваюсь с тем что приходится со своими на англ разговаривать - вот тебе и globalization!

          hangglide TImur Fayzrakhmanov added a comment - Good! Thank you again Elena! Спасибо Лен) Какой раз уже сталкиваюсь с тем что приходится со своими на англ разговаривать - вот тебе и globalization!
          greenman Ian Gilfillan added a comment -

          I have added this as an example to the documentation

          greenman Ian Gilfillan added a comment - I have added this as an example to the documentation

          People

            greenman Ian Gilfillan
            hangglide TImur Fayzrakhmanov
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.