MySQL database programs that can run on a local version of Windows have been available from MySQL AB since version 3.21, and the daily download percentage of MySQL is very large. This section describes the process of installing MySQL on Windows. The installer is for the Windows version of MySQL 5.0, which combines the Graphical Setup wizard, automatically installs MySQL, creates a profile, starts the server, and protects the default user account. If you are upgrading install the existing MySQL 4.1.5 version. You must complete the following steps:
MySQL 5.0 for Windows available formats:
· The installer containing the binaries can be installed all you need in turn you can start the server immediately. · The original class includes all code and support files built using the Visual Studio 2003 compilation system.
In general, you should use binary form. More simple than others, and you do not need additional tools for MySQL to use and run. This article mainly describes how to install MySQL using binary format on Windows.
First, to run MySQL on Windows, you have the following conditions:
· A 32-bit Windows operating system, 9X,ME,NT,2000,XP, or Windows Server2003. Windows NT-based operating system (NT,2000,XP,2003) allows you to run a MySQL server as a service. Use based on The WINDOWS NT operating system is highly recommended.
· TCP/IP protocol support. · Binary version of MySQL for Windows can be downloaded from http://dev.mysql.com/downloads/. Note: If you download via FTP, it is important that we recommend the use of appropriate FTP software. Avoid file corruption in the present process.
· A tool that can open a. zip file to open the installation file
· The space recommended for the hard disk is 200M minimum. If you are ready to connect to MySQL via ODBC, you also need an ODBC connection driver
· You have more than 4GB of tables you need, install MySQL on NTFS or a new file system. Don't forget to use max-rows and avg_row_length when you create a table.
Second, select an installation component
For MySQL 5.0, there are three components used to choose to install MySQL on Windows. The following are the components:
· Basic components: This component has a mysql-essential-5.0.13-rc-win32.msi-like and contains minimum requirements file component that does not contain optional components and included server and benchmark components
· All components: This component has a file name similar to Mysql-5.0.13-rc-win32.zip and contains all the files you need to complete the Windows installation. includes the Configuration Wizard. This component includes optional components and included servers and benchmark components
· No install archive:. This component has a file name similar to Mysql-noinstall-5.0.13-rc-win32.zip and contains files to build the installation component. Except for the Configuration Wizard. This component does not contain automatic installation and must be installed and configured manually. Most advocates recommend the use of basic components.
Iii. using the Configuration Wizard
The MySQL Configuration Wizard can help you implement server Autoconfiguration under Windows systems. The MySQL Configuration Wizard will first create a custom My.ini file based on a set of questions, and then generate a My.ini file that adapts to the installation based on filling in the content and applying it to the template. The configuration Wizard is included in the MySQL 5.0 server and is now only suitable for Windows users. The configuration wizard is largely derived from user feedback on my SQL ab in recent years. If you feel the content of the wizard is missing the important content you need, or if you find an error, please add new or report an error message through the MySQL error reporting system.
After installation, you can go directly to the Configuration Wizard or by clicking the MySQL Server Instance Wizard in Windows Start program to enter the MySQL Configuration Wizard. Alternatively, you can find the MySQLInstanceConfig.exe file in the bin directory under the MySQL installation directory and run it directly.
If your MySQL Configuration Wizard discovers an existing My.ini file, you can reconfigure the existing server, or remove the server instance by removing the My.ini file, stopping and removing the MySQL service. Reconfigure the server that already exists, select the RECONFIGURE instance option and select the Next button. An already existing My.ini file is renamed to Mytimestamp.ini.bak, and the timestamp is the date and time that the My.ini was created when it existed. Remove the existing DB instance, select the Remove Instance option and select the Next button. If the "Remove instances" option is selected, go to the confirmation screen. Click the Run button: the MySQL Configuration Wizard stops and starts removing the MySQL service and deletes the My.ini file. However, the server installation directory is not removed. If you selected the RECONFIGURE instance option, you can choose to install the type of installation you want to configure by entering the configuration type interface.
Selecting "Install MySQL" or "reconfigure instance" from the MySQL Configuration wizard will go to the "Configuration Type" interface with two configuration types to choose from: Detailed configuration and standard configuration. Standard configuration options are designed for beginners who do not need to consider complex server configurations. Detailed configuration options are available to advanced users who can operate the server better. If you are just beginning to use MySQL and use it as a single user development machine, the standard configuration will meet your needs. After you select a standard configuration, the other sections are automatically configured in addition to the service options and Security Options Configuration Wizard. If you have MySQL installed in your machine, the standard configuration may not be appropriate for your system. The detailed configuration option is recommended if you prefer to configure it further.
Then go to the server Type page, there are three different server types to choose from, after selecting the server Type the Configuration wizard will determine the memory, disk, and processor usage according to the different selection.
? Development: This option is a typical desktop workstation and is designed for personal use by MySQL. There are many other desktop applications that can also run on this. The MySQL server uses the smallest system resources.
? Server Edition: Select this option MySQL can run concurrently with some other server applications such as the Ftp,email,web service. The MySQL server configuration uses a moderate degree of system resources.
? MySQL Server pro: This option is only available for running MySQL server and other applications are not allowed to run. The MySQL server configuration will use all available resources.
The database usage interface allows you to indicate which table actions you want to use when you create a MySQL table. The selection determines whether the InnoDB storage engine is available, and the percentage of system resources that INNODB can use. Versatile database: This option is available for the InnoDB and MyISAM storage engines and distributes resources evenly between the two. It is recommended that users of both storage engines be used in the usual situation. Transactional database: This option is available for both the InnoDB and MyISAM storage engines, but prefers that the system's large-sector resources are used by the InnoDB storage engine. It is recommended to use INNODB frequently and rarely use MyISAM users.
? Non-transactional database: This option completely disables the InnoDB storage engine and is fully focused on the MyISAM storage engine. It is recommended for users who do not use InnoDB.
InnoDB Table Space Interface
Some users prefer to place the InnoDB tablespace file in a different location than the MySQL server data directory. If the system has higher storage capacity or a higher performance storage device, such as a RAID storage system, you can place the tablespace file in a different location. You can modify the default location for the InnoDB tablespace file, select one from the list of drive characters in the drop-down list box, and select a new path. Create a custom path and click .... If you modify a server configuration that already exists, you must click the Modify button before you modify the path. You must manually move the existing Tablespace file to a new location before starting the server.
Concurrent Connection Interface
Controlling the number of concurrent connections to the MySQL server can effectively prevent resources from being consumed in the system. The concurrent connection interface allows the Select server to select the server's usage on demand and set concurrent connection limits. You can also manually set the number of concurrent connections.
? Decision Support (DSS)/Online Analytical Processing (OLAP): This is selected when the server does not require a large number of concurrent connections. The maximum number of connections can be up to 100, but there will be an average of 20 concurrent connections.
? Online transaction processing (OLTP): Select this when the server requires a large number of concurrent connections. The maximum number of connections is up to 500.
? Manual settings: Select to manually set the maximum number of trees for concurrent access to the server. Select the maximum number of connections from the drop-down list box, if the number listed in the drop-down list box is not selectable. The maximum number of connections can be entered manually.
Network Configuration Options dialog box
You can use the Network Configuration dialog box to activate or disable TCP/IP Network service configuration and the port number of the MySQL server connection. The TCP/IP network service is activated by default. Windows can disallow TCP/IP network services by selecting the option box that does not select TCP/IP networking options. The port that is usually used by default is 3306. If you need to change the port to access MySQL, you can choose a new port number from the drop-down box or enter the new port number directly in the Options box. If the port number you selected is already in use, you will be prompted to confirm the selection of the port number.
Font Settings dialog box
The MySQL server supports multiple font settings, and you can set the default service font for the server, which can be applied to all data tables, columns, and databases that are not super-controlled. You can use the Font Settings dialog box to change the default font settings for the MySQL server.
1 Standard font settings: This option is used for Latin1 as the default service font. Latin1 can be used in English and many Western fonts.
2 best support for multilingual fonts: This option is used for UTF8 as the default service font. In a single font setting, UTF8 can store fonts from many different languages.
3 Manually select default character set/Sort: This option is used to manually set the default font. You can select the desired character from the font provided in the drop-down selection box.
Service Selection dialog box
On a Windows NT-based platform, the MySQL server can be installed as a service for Windows. When installed as a service, the MySQL server can start up as the system starts and the MySQL server can automatically restart when the service fails. In MySQL's default configuration, the MySQL server is installed as a service, and the name of the service is MySQL. If you do not want to install the service, do not select the Select box as a Windows service. You can choose a new service name from the drop-down selection box provided or enter the new service name directly in the drop-down selection box. If you need to install the MySQL server as a service while keeping MySQL from booting as the system boots, do not select the self-starting MySQL service selection box.
Security selection dialog box
It is highly recommended that you set a corresponding root user password for your MySQL server, while the MySQL Configuration Wizard requires you to set a default root user password. If you do not want to set the root user password, do not select the Modify security Settings option. In order to set the root user password, it is necessary to enter the root user password into both the new root password and the Confirm selection box. If you need to reconfigure an existing server, you need to enter its root user password into the current root password selection box. To prevent the root user from logging on through the network, you can set the root selection box to allow only local connections. This will enhance the security of your root users. In order to generate an anonymous user account, select the Generate Anonymous Account selection box. Generating an anonymous user account may reduce the security of the server while causing difficulties in logging and authentication. For this reason, this option is generally not recommended.
Confirmation dialog box
The final dialog box in the MySQL Configuration Wizard is the confirmation dialog box. You can click the "Execute" button to start the configuration operation. To return to the previous dialog box, you can click the Back button. You can click the "Cancel" button to exit the MySQL configuration Wizard without configuring the server. When you click on the "Execute" button without having to configure the server, the MySQL Configuration Wizard performs a series of tasks that, when executed, will be displayed on the screen. The MySQL Configuration Wizard first uses the template configuration files prepared by MySQL AB developers and engineers to determine the profile options based on your choice. This template is named My-template.ini and is located in your service-period installation directory. The MySQL Configuration Wizard writes these selections to the My.ini file. The final location of the My.ini file will be displayed in the Write profile task. If you choose to generate a service for the MySQL server, the MySQL Configuration Wizard will generate and start the service. If you are reconfiguring an existing service, the MySQL Service wizard will restart the service to reapply the changed configuration. If you choose to set a root password, the MySQL Configuration wizard will connect with the server and set your new root user password to apply the other security settings you have selected. After the MySQL Configuration Wizard finishes its task, a summary will be displayed. Click the "End" button to exit the MySQL Configuration Wizard.
Location of configuration file My.ini
The MySQL Configuration Wizard places the My.ini file in the installation directory of the MySQL server. This will help to associate the configuration file with the specific server instance. To ensure that the MySQL server knows where to look for the My.ini file, parameters similar to the following will be passed to the MySQL server as part of the service installation:--defaults-file= "C:/Program Files/mysql/mysql Server 5.0/my.ini c:/program Files/mysql/mysql Server 5.0 can be replaced by the installation path that points to the MySQL server.
Edit My.ini File
You can use a text editor to open the file and make the necessary edits and modifications. You can also modify the server configuration with the MySQL administrator application. MySQL clients and applications, such as the MySQL command-line client and mysqldump, are not able to determine the location of the My.ini file located in the server installation directory. In order to configure the client and the application, depending on your version of Windows, generate a new file My.ini file under C:/windows or in the C:/winnt directory
Iv. installing MySQL from the Noinstall Zip archive
Users who are installing MySQL from the Noinstall package can use this instructions to manually install MySQL. The steps to install MySQL from the ZIP archive are as follows:
1 Unpack the package under the specified installation directory. 2 Manufacturing selection file. 3 Select the MySQL service type. 4 start MySQL service. 5 Protect the default account.
Unzip the installation package
In order to install MySQL manually, you need to follow these steps:
1 If you need to update the previous version, please refer to the article "Upgrading MySQL on Windows" at the beginning of the update step.
2 If you are using a Windows NT-based operating system such as Windows NT, Windows, Windows XP, or Windows Server 2003, you must ensure that you are logged on to the system as a user with administrator privileges.
3 Select an installation location. The traditional MySQL server is installed in C:/mysql, and the MySQL Installation Wizard installs MySQL to C:/Program Files/mysql. If you do not install MySQL under C:/mysql, you must specify the installation path in the startup or in the Select file.
4 Use the compression tool to unzip the installation compression software to the location where you selected the installation. Some compression tools may be able to extract it to a subdirectory of your chosen installation location. If this is the case, you can move the contents of the subdirectory from the subdirectory to the installation path.
Generate Selection file
If you need to materialize the startup options when running the server, you can flag them at the command line or set them up in a selection file. You will find it convenient to use the selection file to materialize your MySQL configuration for the services that are used each time the server starts. This is especially true when the MySQL service is started on Windows, it looks for options in two files: the My.ini file in the Windows directory, and the c:/my.cnf file. The WINDOWS directory is typically named as follows: C:/windows or c:/winnt. You can use the following command to determine the value of the WINDIR environment variable: c:/> echo%WINDIR% MySQL first looks for the option in the My.ini file and then in the My.cnf file. However, to avoid confusion, it is best to use only one file. If your PC uses the loaded boot kit at the same time C: not the boot area, then you can only use the My.ini file to enter the configuration. Regardless of which selection file you use, the file must be in text format. You can also make full use of the sample files contained in your MySQL release. Looking for files such as MY-SMALL.CNF, MY-MEDIUM.CNF, my-large.cnf and my-huge.cnf in your installation directory, these files can be renamed and copied to the appropriate location as a basic configuration file to use. A selection file can be generated and modified by any text editor, such as Notepad. For example, if MySQL is installed in the E:/mysql directory and the data directory is under E:/mydata/data, you can generate a selection file that contains the [MYSQLD] section to materialize the parameter values for the base directory and Data directory:
[mysqld]# set Basedir to your installation pathbasedir=e:/mysql# set DataDir to the location of your data directorydatadir =e:/mydata/data
It is important to note that the Windows pathname is materialized in a pre-used slash instead of a backslash selection file. So when you use a backslash, you have to use a double slash.
[mysqld]# set Basedir to your installation pathbasedir=e://mysql# set DataDir to the location of your data Directorydatadi R=e://mydata//data
In Windows, the MySQL Setup program installs the data directory directly in the directory where you installed MySQL. If you need to use the data Catalog in a different location, you need to copy the contents of the entire data directory to a new location. For example, if MySQL is installed under the C:/Program Files/mysql/mysql Server 5.0 directory, the location of the data directory defaults to C:/Program files/mysql/mysql server 5.0/data. If you need to use E:/mydata as your data directory, you need to do the following two things:
1 Move the entire data directory and all of its contents from C:/Program Files/mysql/mysql Server 5.0/data to E:/mydata.
2 Use the A--DATADIR option to confirm the new data directory location each time you start the service.
Select MySQL Service type
The following shows the types of services available in the Mysql5.0windows version:
Mysqld-debug is compiled with full debugging and automatic memory allocation checks, and the compiled object also includes InnoDB and BDB data tables. Mysqld optimizes InnoDB supported binary data. Mysqld-nt optimizes the binary data supported by named pipes. Mysqld-max optimized InnoDB and BDB data tables support binary data mysqld-max-nt same as Mysqld-max functionality, but support named pipes at compile time
The above optimization options are for Intel processors, but should work on any Intel I386-class or higher processors. In MySQL 5.0, all Windows version servers provide symbolic links to the database directory. MySQL provides support for TCP/IP on the Windows platform. The MYSQLD-NT and MYSQL-MAX-NT servers provide support for Named pipes under Windows Nt,2000,xp and 2003. However, regardless of the platform, TCP/IP is used by default. (In many Windows configurations, named pipes are slower than TCP/IP services)
The use of Named Pipes is governed by the following conditions:
? Named pipes are activated only if you select--enable-named-pipe when you start the service. It is very necessary to explicitly use this option because some users are experiencing problems with the MySQL server shutting down when the named pipe is in use. Named pipes are only available under the Mysqld-nt or MYSQLD-MAX-NT server and only if the server is running on a platform that supports Windows versions of Named pipes. Under the Windows 98 or me system, these services can run only if TCP/IP is installed. A connection to a named pipe cannot be used.? The above services are not able to run under Windows 95. Note: Most of the examples in the reference manual use Mysqld as the service name. If you use another server, such as mysqld-nt, you need to make a reasonable substitution for the above example.
Installing MySQL under Windows system