Because the database versions of the new and old projects are too different, the encoding is 26684, and the engine is different, so we have to install two databases. Two mysql databases are installed this time. the versions are and respectively. Are executable files directly installed. The version 5536 has been installed on the local machine. because the database versions of the new and old projects are too different, the encoding format is different, and the engine is different, we have to install two databases.
Two mysql databases are installed this time, with versions 4.0.18 and 5.5.36 respectively. Are executable files directly installed.
Version 5.5.36 has been installed on the local machine. it is not a problem for a single database. the installation is completed step by step.
For another version, click "next" to keep installing. Note that you need to find another directory. For example:
5.5.36: d: \ mysql5.5.36 \ 4.0.18: d: \ mysql4.0.18 \
The above experiments have passed in Windows 7 and Windows Server 2008.
The configuration for the second database version 4.0.18 is as follows:
1 configure my. ini
Go to the installation directory, find several my ***. cnf files, and find one as the original configuration. The my-medium.cnf is used here and renamed it my. ini
A total of three changes-1: Find the following configuration section:
[Client]
# Password = my_password
Port = 3306
# Socket = MySQL
Change it:
[Client]
# Password = my_password # version 5.5.36 already occupies the port number 3306, so it is changed to 3307
Port = 3307
# Socket = MySQL # set the encoding format. check whether the project uses the default encoding format. if not, add it directly # block it.
Default-character-set = utf8
-2: [mysqld]
Port = 3306
# Socket = MySQL
Change it:
[Mysqld]
Port = 3307
# Socket = MySQL # similarly, whether the encoding format is changed depends on the 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:
# 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. install the service
-1: Enter the bin directory.
Open cmd and enter the command
D: cd mysql4.0.18 \ bin
-2: The version 5.5.36 installed before the mysql service is installed. the default mysql service name is used: MySQL can open the Task Manager-service to view the service. In version 4.0.18, you must use a new service name named mysql4.0.18.
Enter the bin directory and enter the following code to install the service: mysqld -- install mysql4.0.18 -- defaults-file = 'd: \ mysql4.0.18 \ my. ini'
If the job runs Successfully, the Service Successfully installed is displayed. in this case, open the Task Manager-Service and you can see a mysql4.0.18 Service.
3. set the password
-1: Keep it in the bin directory at this time. do not leave. Enter the following code: mysql-u root-P 3307
3307 is the port number. if it is normal, it will connect to the database.
-2: at this time, a mysql symbol is added. Run the following command to set the password:
Mysql> use mysql;
Mysql> update user set password = password ('password you want to set ') where user = 'root ';
Mysql> flush privileges;
Mysql> quit;
Enable and disable the service:
Method 1: you can find the two mysql services in Task Manager-service, right-click the service name, and display start and stop services.
Method 2: Open cmd and enable and disable the service through net start ***/net stop.
Net start mysql // enable the mysql5.36 service. net stop mysql // disable the mysql5.5.36 service.
Net start mysql4.0.18 // enable the mysql4.0.18 service. net stop mysql4.0.18 // disable
Mysql4.0.18 service