Linux commands have not been tapped for nearly two months, and the fingers are not obedient. It's time to review the story of the oil seller again.
Oracle once struggled with how to start multiple instances and was not convinced. At that time, on a PC, the Oracle10g server software was installed twice, two Sid settings were set, and the disk space after each instance was started was divided. Use dbca to install the database (this is strictly not to say that the database is installed. It is created, but it is different from the concept of "Database" Management in MySQL. For now). In my mind: A Sid corresponds to an instance. We thought that after TNS is configured, the Sid can tell which instance is running on the current terminal. However, after the software is installed, the second instance overwrites the first instance, and the second instance is started by default. In this case, you need to set environment variables to solve this problem. Then, log on to the instance with different Sid at the same time, and the practice proves that it can run very well (at that time, the relationship between the instance and the database was not fully understood, and it had a hard time for one afternoon ).
In MySQL, the instance is controlled through the configuration file. The procedure for starting multiple instances is as follows:
Add the following content to my. CNF (Note: The test user is a database user, not an operating system user, and starts different services on the port .) :
Creating a database user in the configuration file does not understand the specific role of the user. I only know that it is used to control MySQL startup and shutdown. Without him, the service cannot be stopped.
Start Multiple instance services at the same time, set the configuration file, you only need to use the mysqld_multi tool, and Oracle is more complex, two different instances are not written in the configuration file,
Run the following command to start an instance of different ports:
The record for the moment is only the difference between the two DBMS when starting an instance. The management of multiple instances of myql has not been reached yet and will be supplemented later.