Guest_imported
New member
- Jan 1, 1970
- 0
I encounter problem of running two mySQL instances in Windows environment. In Unix, it works well.
Consider the following scenario :
I have two mysql instances installed in my computer. One is located at C:\MYSQL1> and the other is located at C:\MYSQL2>
1. First I run the server with port 1000, using the following command :
C:\MYSQL1> bin\mysqld --console --port=1000 --socket=.\db1.sock --data=.\data
2. Then I run the server with port 2000, as follows:
C:\MYSQL2> bin\mysqld --console --port=2000 --socket=.\db1.sock --data=.\data
It is successfully executed. I can connect to both ports. But when I want to shutdown one of the ports, say, port 2000, using the following command:
C:\MYSQL2> bin\mysqladmin -u root --port=2000 --socket=.\db2.sock shutdown > log
The port 2000 is not shutdown. Instead the port 1000 is shutdown.
Then I try to open port 2000 first and then open port 1000. When I try to shutdown port 1000, the problem comes. Port 1000 is not shutdown, but port 2000 is shutdown.
No matter what you specify in the port option, the FIRST port that is opened will be shutdown first.
What is the solution for this problem? Anyone can help ? Thanks......
Consider the following scenario :
I have two mysql instances installed in my computer. One is located at C:\MYSQL1> and the other is located at C:\MYSQL2>
1. First I run the server with port 1000, using the following command :
C:\MYSQL1> bin\mysqld --console --port=1000 --socket=.\db1.sock --data=.\data
2. Then I run the server with port 2000, as follows:
C:\MYSQL2> bin\mysqld --console --port=2000 --socket=.\db1.sock --data=.\data
It is successfully executed. I can connect to both ports. But when I want to shutdown one of the ports, say, port 2000, using the following command:
C:\MYSQL2> bin\mysqladmin -u root --port=2000 --socket=.\db2.sock shutdown > log
The port 2000 is not shutdown. Instead the port 1000 is shutdown.
Then I try to open port 2000 first and then open port 1000. When I try to shutdown port 1000, the problem comes. Port 1000 is not shutdown, but port 2000 is shutdown.
No matter what you specify in the port option, the FIRST port that is opened will be shutdown first.
What is the solution for this problem? Anyone can help ? Thanks......