because the new and old Project database version gap is too large, the encoding format is different, the engine is different, so had to install two databases.
This time installs two MySQL database, the version is 4.0.18,5.5.36 respectively. Executable files are installed directly.
The 5.5.36 version has been installed on this machine, and a single database is not a problem, and the installation is complete step by step.
Another version is also directly click Next to always install, to note that the place is to find another directory. Like what:
5.5.36:d:\mysql5.5.36\4.0.18:d:\mysql4.0.18\
The above experiments were passed in Windows7 and Windows Server 2008. Next is the configuration of the second database 4.0.18 version:
1 Configuring My.ini
Go to the installation directory and find a few my***.cnf files and find one as the original configuration. The MY-MEDIUM.CNF is used here and renamed My.ini
Change three places altogether-1: Find the following configuration segment:
[Client]
#password =my_password
port=3306
#socket =mysql
Change it to:
[Client]
#password =my_password#5.5.36 version already occupies 3306 of this port number, so change to 3307
port=3307
#socket =mysql# Set the encoding format, see the project, whether it is using the default, do not need to directly add the # mask
Default-character-set=utf8
-2:[MYSQLD]
port=3306
#socket =mysql
Change it to:
[Mysqld]
port=3307
#socket =mysql# The same, does the encoding format change to look at project requirements
#character-set-server=utf8
-3: Key Part # Uncomment the following rows if you move the MySQL distribution to another
# location
#basedir = d:/mysql/
#datadir = d:/mysql/data/
Change it to:
# Uncomment the following rows if you move the MySQL distribution to another
# location
Basedir = d:/mysql4.0.18/
DataDir = d:/mysql4.0.18/data/
2 Installation Services
-1: Go to Bin directory
Open cmd, enter command
D:CD Mysql4.0.18\bin
-2: Install the MySQL service before installing the 5.5.36 version, using the default MySQL service name: MySQL can open the Task Manager--Services, to view this service. The 4.0.18 version needs to use a new service name, which is named this: mysql4.0.18
After entering the bin directory, enter the following code to install the service: mysqld--install mysql4.0.18--defaults-file= ' D:\mysql4.0.18\my.ini '
If the run succeeds, the service successfully installed is displayed. At this point, open Task Manager--services, you can see a mysql4.0.18 service.
3 Setting a password
-1: Keep in the bin directory, do not leave. Enter the following code: Mysql-u root-p 3307
3307 is the port number, if normal, it is connected to the database.
-2: This time, one more MySQL symbol. Enter the following command to set the password:
Mysql>use MySQL;
Mysql>update user Set Password=password (' You want to set the password ') where user= ' root ';
Mysql>flush privileges;
mysql>quit;
To turn services on and off:
Method 1: You can find this two MySQL service in the Task Manager-service, right click on the name, show start service and stop service.
Method 2: Open cmd, and use net start ***/net stop * * * To turn the service on and off.
net start MySQL//Turn on mysql5.5.36 service net stop MySQL//shutdown mysql5.5.36 Service
net start mysql4.0.18//Open mysql4.0.18 Service net stop mysql4.0.18//shutdown mysql4.0.18 Service
Windows installation of two MySQL database steps