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