Easy solution: Install Multiple Mysql instances on Windows

Source: Internet
Author: User

Q: How do I install multiple Mysql instances on Windows?

A: The specific method is as follows:

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, such as backing up to another folder, or name it "Copy mysql ";

4. Run the uninstall program to delete the installed MYSQL and folders;

5. Restore the backup mysql folder to its original name or to its original location;

6. Run the installer again and install it in another directory, for example, "d: \ mysql2 ". Set the port to 3307;

Now, the second Mysql -- mysql2 installed later must be able to run normally. Next let the first Mysql installed at first

Normal Service Running:

In cmd command line mode, enter the \ bin folder of the first Mysql.

Run the mysql-nt install mysql2 command. The function is to install a service for Mysql. The service name is mysql2. You can change the service name by yourself, for example, mysql5. The command is:

Mysql-nt install mysql5

After that, Run REGEDIT in the running directory, open the WINDOWS Registry Editor, and find the service you just installed in the HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ project,

Here is mysql2. Open and modify the following ImagePath value.

Generally, you will see a value similar to "D: \ mysql \ bin \ mysqld-nt" mysql2.

Add the path information of my. ini between mysql-nt and mysql2. format:

-- Defaults-file = "d: \ mysql \ my. ini"

The bold Part replaces your correct path,

After modification, the data value is generally similar to this:

"D: \ mysql \ bin \ mysqld-nt"
-- Defaults-file = "d: \ mysql \ my. ini" mysql2

Click OK to exit the Registry Editor.

Then you can start the mysql2 service normally. In the CMD window, enter the following command:

Net start mysql2

Generally, it should be able to start normally.

If you encounter a 1067 error, delete the LOG file in your mysql \ DATA file and try again.

If the error 1067 still persists, check whether the path in -- defaults-file = "d: \ mysql \ my. ini" is wrong;

If the error 1067 still persists ...... Check your RP ......

Related Article

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.