MySQL multi-instance running in Windows _ MySQL

Source: Internet
Author: User
Running bitsCN.com on multiple MySQL instances in Windows

MySQL multi-instance running in Windows

1. install MySQL for Windows normally, for example, in the d:/MySQL folder;

2. configure MySQL as usual;

3. copy the folder installed in the backup file and name it "MySQL_3307". delete other folders in the data directory, with only the test and mysql folders left;

4. modify Port my. ini under "d:/MySQL_3307" to 3307

Java code

[Client]

Port = 3307

[Mysqld]

# The TCP/IP Port the MySQL Server will listen on

Port = 3307

Change the program path to d:/MySQL_3307.

Java code

[Mysqld]

# The TCP/IP Port the MySQL Server will listen on

Port = 3307

# Path to installation directory. All paths are usually resolved relative to this.

Basedir = "d:/MySQL_3307"

# Path to the database root

Datadir = "d:/MySQL_3307/Data /"

5. in cmd command line mode, enter 2nd/bin folders of MySQL_3307.

Run the mysqld install MySQL_3307 command. The role is to install a service for Mysql. the service name is MySQL_3307,

6. after that, run REGEDIT in the running state and open the WINDOWS Registry Editor,

Open HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MySQL_3307,

Modify the following ImagePath value: "D:/MySQL_3307/bin/mysqld" -- defaults-file = "D:/MySQL_3307/my. ini" MySQL_3307

Click OK to exit the registry editor.

7. then, you can start the MySQL_3307 service in service management.

Note: to rename the mysql service name,

1. go to services. msc to disable the MySQL service.

2. C:/> SC delete MySQL "MySQL" is the service name.

3. Repeat steps 6th and 7 above.

After the service is deleted, go to the registry and check whether the old mysql node is deleted.

BitsCN.com

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.