<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="cannot-initialize-character-set">
      </a>
      B.3.2.15 Can't initialize character set
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045054210352">
  </a>
  <p>
   You might see an error like this if you have character set
          problems:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-none"><div class="docs-select-all right" id="sa48298874"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">MySQL Connection Failed: Can't initialize character set <em class="replaceable">charset_name</em></code></pre>
  </div>
  <p>
   This error can have any of the following causes:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      The character set is a multibyte character set and you
              have no support for the character set in the client. In
              this case, you need to recompile the client by running
      <span class="command">
       <strong>
        CMake
       </strong>
      </span>
      with the
      <a class="link" href="source-configuration-options.html#option_cmake_default_charset">
       <code class="option">
        -DDEFAULT_CHARSET=
        <em class="replaceable">
         <code>
          charset_name
         </code>
        </em>
       </code>
      </a>
      option. See
      <a class="xref" href="source-configuration-options.html" title="2.8.7 MySQL Source-Configuration Options">
       Section 2.8.7, “MySQL Source-Configuration Options”
      </a>
      .
     </p>
     <p>
      All standard MySQL binaries are compiled with support for
              all multibyte character sets.
     </p>
    </li>
    <li class="listitem">
     <p>
      The character set is a simple character set that is not
              compiled into
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      , and the character
              set definition files are not in the place where the client
              expects to find them.
     </p>
     <p>
      In this case, you need to use one of the following methods
              to solve the problem:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         Recompile the client with support for the character
                  set. See
         <a class="xref" href="source-configuration-options.html" title="2.8.7 MySQL Source-Configuration Options">
          Section 2.8.7, “MySQL Source-Configuration Options”
         </a>
         .
        </p>
       </li>
       <li class="listitem">
        <p>
         Specify to the client the directory where the
                  character set definition files are located. For many
                  clients, you can do this with the
         <code class="option">
          --character-sets-dir
         </code>
         option.
        </p>
       </li>
       <li class="listitem">
        <p>
         Copy the character definition files to the path where
                  the client expects them to be.
        </p>
       </li>
      </ul>
     </div>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
