Install Multiple MySQL instances in Windows

Source: Internet
Author: User
In Windows Install Multiple MySQLI often see people posting on the forum asking how to install multiple MySQL instances in windows. I think this is the most frequently asked question for beginners. Although there are many experts, many people are still not very clear about it. I think the key is to understand how MySQL starts under Win32, the problem is solved. After installing MySql in NT, the bin directory contains three commonly used files: mysqld-nt, MySQL and mysqladmin. mysqld-nt is a server program. You can use mysqld-NT-standalone (with-standalone) to start it. In this way, the startup is started according to the default configuration file. This configuration is generally my. ini, including port settings and other information. My. INI is in the NT folder before 5.0.0 and in the installation directory after 5.0.0. This is the problem! If you start multiple MySQL instances, they will compete with the configuration file, of course, they will not start. Because multiple MySQL instances cannot use one port. You can also specify the binding port and other settings with parameters. In this case, you can use the following operations to solve the problem: C:/MySQL/bin/mysqld-NT -- defaults-file = C:/MySQL/My. ini-standalone: The parameter -- defaults-file = C:/MySQL/My. INI, mysqld-NT will load the specified configuration, namely C:/MySQL/My. in this way, we can modify the configuration file in the installation directory of each MySQL. The following is an example of the configuration file for the system: 2003 MYSQL: 3.23.47 and 4.1.3b-beta3.23.47: [mysqld] basedir = C:/mysqldatadir = C: the configuration file for/MySQL/dataport = 3305 4.1.3b-beta is as follows: [mysqld] basedir = C:/mysql4datadir = C:/mysql4/dataport = 3306 we start mysql3.23.47. connect to MySQL, you can start mysql4.1.3b or use netstat-An to check the port. If you are listening, you can also install a few more ports! :> Finally, let's take a look at the security configuration of MySQL. After the MySQL connection is used, open the user table and see the following: there are a lot of users in it, and delete them all. Don't leave them here, grant all privileges on *. * To yourname @ yourhost identified by 'yourpassword' with grant option; a user that only you know is created. Haha.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.