Running Multiple MySQL Instances on Windows Usually NFS file locking is handled by the  lockd  daemon, but at the moment there is no platform that performs locking 100% reliably in every situation. With this method, the data directory is in the same state as when you first install MySQL, and has the default set of MySQL accounts and no user data. On Unix, initialize the data directory. See Section 2.10, “Postinstallation Setup and Testing” . On Windows, the data directory is included in the MySQL distribution: •MySQL Zip archive distributions for Windows contain an unmodified data directory. You can unpack such a distribution into a temporary location, then copy it  data  directory to where you are setting up the new instance. •Windows MSI package installers create and set up the data directory that the installed server uses, but also create a pristine “template”  data directory named  data  under the installation directory. After an installation has been performed using an MSI package, the template data directory can be copied to set up additional MySQL instances. With this method, any MySQL accounts or user data present in the data directory are carried over to the new data directory. Create a New Data Directory Copy an Existing Data Directory 1. Stop the existing MySQL instance using the data directory. This must be a clean shutdown so that the instance flushes any pending changes to disk. 2. Copy the data directory to the location where the new data directory should be. 3. Copy the  my.cnf  or  my.ini  option file used by the existing instance. This serves as a basis for the new instance. 4. Modify the new option file so that any pathnames referring to the original data directory refer to the new data directory. Also, modify any other options that must be unique per instance, such as the TCP/IP port number and the log files. For a list of parameters that must be unique per instance, see Section 5.8, “Running Multiple MySQL Instances on One Machine” . 5. Start the new instance, telling it to use the new option file. 5.8.2 Running Multiple MySQL Instances on Windows 5.8.2.1 Starting Multiple MySQL Instances at the Windows Command Line You can run multiple servers on Windows by starting them manually from the command line, each with appropriate operating parameters, or by installing several servers as Windows services and running them that way. General instructions for running MySQL from the command line or as a service are given in Section 2.3, “Installing MySQL on Microsoft Windows” . The following sections describe how to start each server with different values for those options that must be unique per server, such as the data directory. These options are listed in Section 5.8, “Running Multiple MySQL Instances on One Machine” . The procedure for starting a single MySQL server manually from the command line is described in Section 2.3.4.6, “Starting MySQL from the Windows Command Line” . To start multiple servers this way, you can specify the appropriate options on the command line or in an option file. It is more convenient to place the options in an option file, but it is necessary to make sure that each server gets its own set 1148