Get the App
SLTechnology News&Howtos  ›  Database  › 

How to install two mysql on the same computer

Shulou Source: shulou.com Published: 2022-06-01 02:02:03 09月25日 Update

How do I install two mysql on the same computer? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

The mysql can hold two. Installation steps: 1, normally install the first mysql on disk c, and then close the service; 2, put another MySQL file on disk D; 3, configure the my.ini file on disk D, change all ports to 3307countries 4, create a second mysql service, and modify the registry configuration.

Steps to install two mysql on one computer

Step 1: install the first mysql normally, and then shut down the service in Control Panel-Management tools-Service.

Step 2: copy the MySQL folder under C:\\ Program Files and copy it to disk E.

Step 3: find the my.ini file of the original mysql (some are directly in C:\\ Program Files, some are not, this time I am under C:\\ ProgramData\\ MySQL\\ MySQL Server 5.7)

Step 4: copy the my file of the original mysql found and put it in the new mysql_base folder E:\\ MySQL\\ mysql_base.

Step 5: modify the copied my file, as shown in the figure

This is to change all ports to 3307, and the mysql port on disk C is 3306.

Modify basedir and datadir when I copied the mysql folder here, the data folder was not together, it was at programdata, so I have to go to programdata to copy the data folder.

Step 6 create a service

First, cmd changes to the directory E:\\ MySQL\\ MySQL Server 5.7\\ bin

And then write.

Mysqld install MySQL2-defaults-file= "E:\\ MySQL\\ mysql_base\\ my.ini"

Step 7 modify the registry

Run-regedit to open the registry

HKEY_LOCAL_MACHINE-- > SYSTEM-- > CurrentControlSet-- > Services will find MySQL2.

Modify the content of MySQL2 as shown in the figure

Basically, just modify the previous section of defaults to find the path where mysqld is located and put it on it.

Step 8 Control Panel Control Panel-Management tools-the MySQL before the service is enabled and the MySQL2 just now

That's about it.

Thank you for reading! After reading the above, do you have a general idea of how to install two mysql on the same computer? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.

Tags: Files services contents folders two computers registries ports panels controls that is tools articles steps management tools problems such as figure management configuration where Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Information macOS Huawei Linux