[+/-]
A native Windows distribution of MySQL has been available since version 3.21 and represents a sizable percentage of the daily downloads of MySQL. This section describes the process for installing MySQL on Windows.
If you are upgrading MySQL from an existing installation older than MySQL 4.1.5, you must first perform the procedure described in Section 2.3.14, “Upgrading MySQL on Windows”.
To run MySQL on Windows, you need the following:
A Windows operating system such as Windows 2000, Windows XP, Windows Vista, Windows Server 2003, or Windows Server 2008. Both 32-bit and 64-bit versions are supported.
A Windows operating system permits you to run the MySQL server as a service. See Section 2.3.11, “Starting MySQL as a Windows Service”.
Generally, you should install MySQL on Windows using an
account that has administrator rights. Otherwise, you may
encounter problems with certain operations such as editing the
PATH
environment variable or accessing the
Service Control Manager. Once installed,
MySQL does not need to be executed using a user with
Administrator privileges.
TCP/IP protocol support.
Enough space on the hard drive to unpack, install, and create the databases in accordance with your requirements (generally a minimum of 200 megabytes is recommended.)
For a list of limitations within the Windows version of MySQL, see Section D.7.3, “Windows Platform Limitations”.
There may also be other requirements, depending on how you plan to use MySQL:
If you plan to connect to the MySQL server via ODBC, you need a Connector/ODBC driver. See Section 20.1, “MySQL Connector/ODBC”.
If you plan to use MySQL server with ADO.NET applications, you need the Connector/NET driver. See Section 20.2, “MySQL Connector/NET”.
If you need tables with a size larger than 4GB, install MySQL
on an NTFS or newer file system. Don't forget to use
MAX_ROWS
and
AVG_ROW_LENGTH
when you create tables. See
Section 12.1.17, “CREATE TABLE
Syntax”.
MySQL for Windows is available in several distribution formats:
Binary distributions are available that contain a setup program that installs everything you need so that you can start the server immediately. Another binary distribution format contains an archive that you simply unpack in the installation location and then configure yourself. For details, see Section 2.3.1, “Choosing An Installation Package”.
The source distribution contains all the code and support files for building the executables using the Visual Studio compiler system.
Generally speaking, you should use a binary distribution that includes an installer. It is simpler to use than the others, and you need no additional tools to get MySQL up and running. The installer for the Windows version of MySQL, combined with a GUI Configuration Wizard, automatically installs MySQL, creates an option file, starts the server, and secures the default user accounts.
Using virus scanning software such as Norton/Symantec Anti-Virus on directories containing MySQL data and temporary tables can cause issues, both in terms of the performance of MySQL and the virus-scanning software mis-identifying the contents of the files as containing spam. This is because of the fingerprinting mechanism used by the virus scanning software, and the way in which MySQL rapidly updates different files, which may be identified as a potential security risk.
After installing MySQL Server, it is recommended that you
disable virus scanning on the main directory
(datadir
) being used to store
your MySQL table data. There is usually a system built into the
virus scanning software to allow certain directories to be
specifically ignored during virus scanning.
In addition, by default, MySQL creates temporary files in the
standard Windows temporary directory. To prevent the temporary
files also being scanned, you should configure a separate
temporary directory for MySQL temporary files and add this to
the virus scanning exclusion list. To do this, add a
configuration option for the
tmpdir
parameter to your
my.ini
configuration file. For more
information, see Section 2.3.7, “Creating an Option File”.
The following section describes how to install MySQL on Windows using a binary distribution. To use an installation package that does not include an installer, follow the procedure described in Section 2.3.5, “Installing MySQL from a Noinstall Zip Archive”. To install using a source distribution, see Section 2.10.6, “Installing MySQL from Source on Windows”.
MySQL distributions for Windows can be downloaded from http://dev.mysql.com/downloads/. See Section 2.1.3, “How to Get MySQL”.
User Comments
You may appreciate the step-by-step instructions of "MySQL Basics -- A Helpful MySQL Tutorial" at http://www.analysisandsolutions.com/code/mysql-tutorial.htm
Add your own comment.