How to use strongSwan for mysql installation-free files
1. preparations
Download mysql's latest free installation unzip mysql-noinstall-5.1.53-win32.zip, decompress to the relevant directory, such as: d:/mysql-noinstall-5.1.53-win32. This is the root directory of mysql.
2. configuration
There are several files in the root directory:
My-small.ini (this is for a small memory (<= 64 MB) system, MySQL will only be used from time to time, it is important that the mysqld daemon will not use a lot of resources .) My-medium.ini (which is targeted at a small memory (32 M-64 M) system, MySQL plays a more important part, or when the system reaches 128 MB, MySQL is used with other programs (such as a Web server .) My-large.ini (this is for a memory = 512 M large system, the system mainly run MySQL) my-huge.ini (this is for a memory for 1G-2G large system, the system mainly run 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 executing complex queries using several connections) corresponds to your own configuration, select one and delete the other. Rename it to my. ini. Edit my. ini and add the following sentence under the [mysqld] Node: basedir = D:/mysql-noinstall-5.1.53-win32 # root directory datadir = D:/mysql-noinstall-5.1.53-win32/data # data file storage directory
3. install the service
Cmd: Enter the mysql root directory in: mysqld -- install MySQL and add a windows service with the default MySQL name. To remove the mysql service: mysqld-remove MySQL set the service to auto start: SC config MySQL start = auto
4. start and close
The code is as follows:
Cmd: net start MySQL -- start net stop MySQL -- disable
After mysql is started. In the task manager, you can see the process mysqld.exe. It indicates that mysql has been installed. Started successfully!
5. simplified:
If you think the mysql directory is too large, see. Only the my. ini and bin, data, and share directories can be left in the root directory, and all others can be deleted. You can delete all. pdb files in the bin directory.
6. initialize the database:
Because the default mysql root password is empty and can only be logged on from the local machine, make the following changes: cmd: Enter the mysql root directory in: mysql-uroot and enter the mysql command line interface, continue input:
The code is as follows:
Mysql <use mysql; mysql <delete from user; mysql <grant all on *. * to root @ '%' identified by "root" with grant option; mysql <flush privileges; mysql <quit;
In this way, the initial password "root" is assigned to the root user, and local logon is not restricted.
7. garbled problem:
Modify the my. ini file, find [mysqld], and add:
The code is as follows:
Character-set-server = utf8 # start from mysql5.5 default-character-set = utf8 # before mysql5.5
Find the [client] and add the following:
The code is as follows:
Default-character-set = utf8