1. download the compressed file of the free installation version and decompress it to a directory. for example, D: mysqlmysql562 has a my-defaultint under the root directory after decompression. copy the file to another directory, rename myini. 21. modify the myini file. 1. download the compressed file of the free installation version and decompress it to a directory, for example, D: \ mysql \ mysql56.
2. there is a my-default.int under the extracted root directory, copy this file to another directory, rename it my. ini.
2.1. modify the my. ini file as follows:
[client] port=3306 default-character-set=utf8[mysqld]# These are commonly set, remove the # and set as required. basedir = D:\mysql\mysql56 datadir = D:\mysql\mysql56\data port = 3306 character_set_server=utf8sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [WinMySQLAdmin]Server=D:\mysql\mysql56\bin\mysqld.exe
2. cut my. ini and paste it to the root directory after mysql decompression.
3. configure environment variables:
3.1 MYSQL_HOME = D: \ mysql \ mysql56 (root directory after decompression)
Append after 3.2 Path; % MYSQL_HOME % \ bin
4. from the console cd to the bin directory after mysql extraction, install mysql as a system service.
For example, 4.1: C: \ Users \ Administrator> D:
4.2: D> D: \ mysql \ mysql56 \ bin
4.3: mysqld install MySQL -- defaults-file = "D: \ Program Files \ MySQL \ mysql-5.6.13-win32 \ my. ini"
5. start the mysql service: net start mysql.
6. modify the mysql database server username: root password
C:> mysql-uroot
Mysql> use mysql;
Mysql> UPDATE user SET password = PASSWORD ("ganbare") WHERE user = 'root ';
Mysql> flush privileges;
Mysql> QUIT