<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="windows-restrictions">
      </a>
      2.3.6 Windows Platform Restrictions
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045331758656">
  </a>
  <p>
   The following restrictions apply to use of MySQL on the Windows
      platform:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        Process memory
       </strong>
      </span>
     </p>
     <p>
      On Windows 32-bit platforms, it is not possible by default to
          use more than 2GB of RAM within a single process, including
          MySQL. This is because the physical address limit on Windows
          32-bit is 4GB and the default setting within Windows is to
          split the virtual address space between kernel (2GB) and
          user/applications (2GB).
     </p>
     <p>
      Some versions of Windows have a boot time setting to enable
          larger applications by reducing the kernel application.
          Alternatively, to use more than 2GB, use a 64-bit version of
          Windows.
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        File system aliases
       </strong>
      </span>
     </p>
     <p>
      When using
      <code class="literal">
       MyISAM
      </code>
      tables, you cannot use
          aliases within Windows link to the data files on another
          volume and then link back to the main MySQL
      <a class="link" href="server-system-variables.html#sysvar_datadir">
       <code class="option">
        datadir
       </code>
      </a>
      location.
     </p>
     <p>
      This facility is often used to move the data and index files
          to a RAID or other fast solution.
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        Limited number of ports
       </strong>
      </span>
     </p>
     <p>
      Windows systems have about 4,000 ports available for client
          connections, and after a connection on a port closes, it takes
          two to four minutes before the port can be reused. In
          situations where clients connect to and disconnect from the
          server at a high rate, it is possible for all available ports
          to be used up before closed ports become available again. If
          this happens, the MySQL server appears to be unresponsive even
          though it is running. Ports may be used by other applications
          running on the machine as well, in which case the number of
          ports available to MySQL is lower.
     </p>
     <p>
      For more information about this problem, see
      <a class="ulink" href="https://support.microsoft.com/kb/196271" target="_blank">
       https://support.microsoft.com/kb/196271
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        <code class="literal">
         DATA DIRECTORY
        </code>
        and
        <code class="literal">
         INDEX DIRECTORY
        </code>
       </strong>
      </span>
     </p>
     <p>
      The
      <code class="literal">
       DATA DIRECTORY
      </code>
      clause of the
      <a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
       <code class="literal">
        CREATE TABLE
       </code>
      </a>
      statement is
          supported on Windows for
      <code class="literal">
       InnoDB
      </code>
      tables
          only, as described in
      <a class="xref" href="innodb-create-table-external.html" title="17.6.1.2 Creating Tables Externally">
       Section 17.6.1.2, “Creating Tables Externally”
      </a>
      . For
      <code class="literal">
       MyISAM
      </code>
      and other storage engines, the
      <code class="literal">
       DATA DIRECTORY
      </code>
      and
      <code class="literal">
       INDEX
          DIRECTORY
      </code>
      clauses for
      <a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
       <code class="literal">
        CREATE
          TABLE
       </code>
      </a>
      are ignored on Windows and any other platforms
          with a nonfunctional
      <code class="literal">
       realpath()
      </code>
      call.
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        <a class="link" href="drop-database.html" title="15.1.24 DROP DATABASE Statement">
         <code class="literal">
          DROP
          DATABASE
         </code>
        </a>
       </strong>
      </span>
     </p>
     <p>
      You cannot drop a database that is in use by another session.
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        Case-insensitive names
       </strong>
      </span>
     </p>
     <p>
      File names are not case-sensitive on Windows, so MySQL
          database and table names are also not case-sensitive on
          Windows. The only restriction is that database and table names
          must be specified using the same case throughout a given
          statement. See
      <a class="xref" href="identifier-case-sensitivity.html" title="11.2.3 Identifier Case Sensitivity">
       Section 11.2.3, “Identifier Case Sensitivity”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        Directory and file names
       </strong>
      </span>
     </p>
     <p>
      On Windows, MySQL Server supports only directory and file
          names that are compatible with the current ANSI code pages.
          For example, the following Japanese directory name does not
          work in the Western locale (code page 1252):
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-ini"><div class="docs-select-all right" id="sa84914064"><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-ini"><span class="token constant">datadir</span><span class="token attr-value"><span class="token punctuation">=</span>"C:/私たちのプロジェクトのデータ"</span></code></pre>
     </div>
     <p>
      The same limitation applies to directory and file names
          referred to in SQL statements, such as the data file path name
          in
      <a class="link" href="load-data.html" title="15.2.9 LOAD DATA Statement">
       <code class="literal">
        LOAD DATA
       </code>
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        The
        <code class="literal">
         \
        </code>
        path name
          separator character
       </strong>
      </span>
     </p>
     <p>
      Path name components in Windows are separated by the
      <code class="literal">
       \
      </code>
      character, which is also the escape
          character in MySQL. If you are using
      <a class="link" href="load-data.html" title="15.2.9 LOAD DATA Statement">
       <code class="literal">
        LOAD
          DATA
       </code>
      </a>
      or
      <a class="link" href="select-into.html" title="15.2.13.1 SELECT ... INTO Statement">
       <code class="literal">
        SELECT ... INTO
          OUTFILE
       </code>
      </a>
      , use Unix-style file names with
      <code class="literal">
       /
      </code>
      characters:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa98652142"><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-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">LOAD</span> <span class="token keyword">DATA</span> <span class="token keyword">INFILE</span> <span class="token string">'C:/tmp/skr.txt'</span> <span class="token keyword">INTO</span> <span class="token keyword">TABLE</span> skr<span class="token punctuation">;</span>
<span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">INTO</span> <span class="token keyword">OUTFILE</span> <span class="token string">'C:/tmp/skr.txt'</span> <span class="token keyword">FROM</span> skr<span class="token punctuation">;</span></code></pre>
     </div>
     <p>
      Alternatively, you must double the
      <code class="literal">
       \
      </code>
      character:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa59595940"><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-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">LOAD</span> <span class="token keyword">DATA</span> <span class="token keyword">INFILE</span> <span class="token string">'C:\\tmp\\skr.txt'</span> <span class="token keyword">INTO</span> <span class="token keyword">TABLE</span> skr<span class="token punctuation">;</span>
<span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">INTO</span> <span class="token keyword">OUTFILE</span> <span class="token string">'C:\\tmp\\skr.txt'</span> <span class="token keyword">FROM</span> skr<span class="token punctuation">;</span></code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        Problems with pipes
       </strong>
      </span>
     </p>
     <p>
      Pipes do not work reliably from the Windows command-line
          prompt. If the pipe includes the character
      <code class="literal">
       ^Z
      </code>
      /
      <code class="literal">
       CHAR(24)
      </code>
      , Windows
          thinks that it has encountered end-of-file and aborts the
          program.
     </p>
     <p>
      This is mainly a problem when you try to apply a binary log as
          follows:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa75711259"><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-terminal"><span class="token prompt">C:\&gt;</span><span class="token command"> mysqlbinlog</span> <em class="replaceable">binary_log_file</em> | mysql <span class="token constant">--user</span><span class="token attr-value"><span class="token punctuation">=</span>root</span></code></pre>
     </div>
     <p>
      If you have a problem applying the log and suspect that it is
          because of a
      <code class="literal">
       ^Z
      </code>
      /
      <code class="literal">
       CHAR(24)
      </code>
      character, you can use the
          following workaround:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa21360665"><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-terminal"><span class="token prompt">C:\&gt;</span><span class="token command"> mysqlbinlog</span> <em class="replaceable">binary_log_file</em> <span class="token constant">--result-file</span><span class="token attr-value"><span class="token punctuation">=</span>/tmp/bin.sql</span>
<span class="token prompt">C:\&gt;</span><span class="token command"> mysql</span> <span class="token constant">--user</span><span class="token attr-value"><span class="token punctuation">=</span>root</span> <span class="token property">--execute</span> <span class="token atrule">"source /tmp/bin.sql"</span></code></pre>
     </div>
     <p>
      The latter command also can be used to reliably read any SQL
          file that may contain binary data.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
