1. Preparatory work
Download MySQL's latest free install version mysql-noinstall-5.5.25a-win32.zip, unzip to the relevant directory, such as: d:\\ Mysql-noinstall-5.1.53-win32. This is the root directory of MySQL.
http://dev.mysql.com/downloads/mysql/
2. Configuration
In the root directory there are several files as follows:
- My-small.ini (This is for a small memory (〈= 64MB) system, MySQL will only be used from time to time, it is important that the mysqld daemon does not use a lot of resources. )
- My-medium.ini (This is for a small memory (32m-64m) system, MySQL plays a relatively important part, or when the system reaches 128M, MySQL is used in conjunction with other programs, such as a WEB server. )
- My-large.ini (This is for a large system of memory = 512M, the system mainly runs MySQL)
- My-huge.ini (This is for a large system of memory 1g–2g, the system mainly runs MySQL)
- My-innodb-heavy-4g.ini (This is an example of a MySQL configuration file for a 4G memory system (mainly running MySQL with only innodb tables and using several connections to perform complex queries)
corresponding to their own configuration, the choice of their own, the other to delete it. Then rename it to My.ini. Edit the My.ini and add the following sentences under the [Mysqld] node:
3. Installation Services
CMD: Go to the root directory of MySQL \ bin:
Mysqld--install MySQL
This adds a Windows service to the name with the default MySQL. To remove the MySQL service:
Mysqld–remove MySQL
Set the service to start automatically:
sc config MySQL start= auto
4. Start and close
Cmd:
After MySQL starts. The Mysqld.exe process can be seen in the task manager. This means that MySQL is already installed. and has been successfully launched!
5. Streamlining:
If you think the MySQL directory is too large, please see. The root directory can only leave the My.ini and Bin,data,share directories, and all the rest are deleted. The. pdb file can be removed from the bin directory.
6. Initialize the database:
Since the default root password for MySQL is empty and can only be logged on natively, make the following changes:
CMD: Go to the root directory of MySQL \ bin:
Mysql-uroot
At this point, you enter the MySQL command line interface and continue typing:
This gives the root user the initial password "root" and can not restrict native logons.
7. Garbled problem:
Modify the My.ini file to find [mysqld] and add the following below:
Character-set-server = UTF8 #mysql5.5 Start Default-character-set = UTF8 #mysql5.5 ago
Find [client] and add it below:
Default-character-set = UTF8