DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(mysql.info.gz) Windows vs Unix

Info Catalog (mysql.info.gz) Windows upgrading (mysql.info.gz) Windows installation
 
 2.3.16 MySQL on Windows Compared to MySQL on Unix
 -------------------------------------------------
 
 MySQL for Windows has proven itself to be very stable. The Windows
 version of MySQL has the same features as the corresponding Unix
 version, with the following exceptions:
 
 *Windows 95 and threads*
      Windows 95 leaks about 200 bytes of main memory for each thread
      creation.  Each connection in MySQL creates a new thread, so you
      shouldn't run `mysqld' for an extended time on Windows 95 if your
      server handles many connections!  Other versions of Windows don't
      suffer from this bug.
 
 *Limited number of ports*
      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 will appear to have become unresponsive even though it is
      running.  Note that 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.
 
      For more information, see
      `http://support.microsoft.com/default.aspx?scid=kb;en-us;196271'.
 
 *Concurrent reads*
      MySQL depends on the `pread()' and `pwrite()' calls to be able to
      mix `INSERT' and `SELECT'.  Currently we use mutexes to emulate
      `pread()'/`pwrite()'.  We will, in the long run, replace the file
      level interface with a virtual interface so that we can use the
      `readfile()'/`writefile()' interface on NT, 2000, and XP to get
      more speed.  The current implementation limits the number of open
      files MySQL can use to 2,048 (1,024 before MySQL 4.0.19), which
      means that you will not be able to run as many concurrent threads
      on NT, 2000, and XP as on Unix.
 
 *Blocking read*
      MySQL uses a blocking read for each connection, which has the
      following implications if named pipe connections are enabled:
 
         * A connection will not be disconnected automatically after
           eight hours, as happens with the Unix version of MySQL.
 
         * If a connection hangs, it's impossible to break it without
           killing MySQL.
 
         * `mysqladmin kill' will not work on a sleeping connection.
 
         * `mysqladmin shutdown' can't abort as long as there are
           sleeping connections.
 
      We plan to fix this problem when our Windows developers have
      figured out a nice workaround.
 
 *`ALTER TABLE'*
      While you are executing an `ALTER TABLE' statement, the table is
      locked from being used by other threads.  This has to do with the
      fact that on Windows, you can't delete a file that is in use by
      another thread.  In the future, we may find some way to work
      around this problem.
 
 *`DROP TABLE'*
      `DROP TABLE' on a table that is in use by a `MERGE' table will not
      work on Windows because the `MERGE' handler does the table mapping
      hidden from the upper layer of MySQL.  Because Windows doesn't
      allow you to drop files that are open, you first must flush all
      `MERGE' tables (with `FLUSH TABLES') or drop the `MERGE' table
      before dropping the table.  We will fix this at the same time we
      introduce views.
 
 *`DATA DIRECTORY' and `INDEX DIRECTORY'*
      The `DATA DIRECTORY' and `INDEX DIRECTORY' options for `CREATE
      TABLE' are ignored on Windows, because Windows doesn't support
      symbolic links.  These options also are ignored on systems that
      have a non-functional `realpath()' call.
 
 *`DROP DATABASE'*
      You cannot drop a database that is in use by some thread.
 
 *Killing MySQL from the Task Manager*
      You cannot kill MySQL from the Task Manager or with the shutdown
      utility in Windows 95.  You must stop it with `mysqladmin
      shutdown'.
 
 *Case-insensitive names*
      Filenames 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.   Name case
      sensitivity.
 
 *The `\' pathname separator character*
      Pathname components in Windows are separated by the `\' character,
      which is also the escape character in MySQL.  If you are using
      `LOAD DATA INFILE' or `SELECT ... INTO OUTFILE', use Unix-style
      filenames with `/' characters:
 
           mysql> LOAD DATA INFILE 'C:/tmp/skr.txt' INTO TABLE skr;
           mysql> SELECT * INTO OUTFILE 'C:/tmp/skr.txt' FROM skr;
 
      Alternatively, you must double the `\' character:
 
           mysql> LOAD DATA INFILE 'C:\\tmp\\skr.txt' INTO TABLE skr;
           mysql> SELECT * INTO OUTFILE 'C:\\tmp\\skr.txt' FROM skr;
 
 *Problems with pipes.*
      Pipes do not work reliably from the Windows command-line prompt.
      If the pipe includes the character `^Z' / `CHAR(24)', Windows will
      think it has encountered end-of-file and abort the program.
 
      This is mainly a problem when you try to apply a binary log as
      follows:
 
           C:\> mysqlbinlog binary-log-name | mysql --user=root
 
      If you have a problem applying the log and suspect that it is
      because of a `^Z' / `CHAR(24)' character, you can use the
      following workaround:
 
           C:\> mysqlbinlog binary-log-file --result-file=/tmp/bin.sql
           C:\> mysql --user=root --execute "source /tmp/bin.sql"
 
      The latter command also can be used to reliably read in any SQL
      file that may contain binary data.
 
 *`Access denied for user' error*
      If you attempt to run a MySQL client program to connect to a server
      running on the same machine, but get the error `Access denied for
      user 'SOME-USER'@'unknown' to database 'mysql'', this means that
      MySQL cannot resolve your hostname properly.
 
      To fix this, you should create a file named `\windows\hosts'
      containing the following information:
 
           127.0.0.1       localhost
 
 
 Here are some open issues for anyone who might want to help us improve
 MySQL on Windows:
 
      PD: Commented this one out as obsolete until I hear otherwise
 
    * Make a single-user `MYSQL.DLL' server.  This should include
      everything in a standard MySQL server, except thread creation.
      This will make MySQL much easier to use in applications that don't
      need a true client/server and don't need to access the server from
      other hosts.
 
    * Add some nice start and shutdown icons to the MySQL installation.
 
    * It would be really nice to be able to kill `mysqld' from the Task
      Manager in Windows 95.  For the moment, you must use `mysqladmin
      shutdown'.
 
    * Port `readline' to Windows for use in the `mysql' command-line
      tool.
 
    * GUI versions of the standard MySQL clients (`mysql', `mysqlshow',
      `mysqladmin', and `mysqldump') would be nice.
 
    * It would be nice if the socket read and write functions in `net.c'
      were interruptible. This would make it possible to kill open
      threads with `mysqladmin kill' on Windows.
 
    * Add macros to use the faster thread-safe increment/decrement
      methods provided by Windows.
 
Info Catalog (mysql.info.gz) Windows upgrading (mysql.info.gz) Windows installation
automatically generated byinfo2html