1. Download MySQL Community Server 5.6.13
2. Unzip the MySQL archive package
Unzip the downloaded MySQL package into a custom directory, and my unzip directory is:
"D:\Program Files\mysql\mysql-5.6.13-win32"
Will unzip the directory under the default file My-default.ini copy one copy, renamed My.ini
Copy the following configuration information to My.ini save
#如果没有my-default.ini, you can create your own my.ini or get it from somewhere else.
#########################################################
[Client]
port=3306
Default-character-set=utf8
[Mysqld]
port=3306
Character_set_server=utf8
Basedir=d:\program Files\mysql\mysql-5.6.13-win32
#解压目录
Datadir=d:\program Files\mysql\mysql-5.6.13-win32\data
#解压目录下data目录
Sql_mode=no_engine_substitution,strict_trans_tables
[Winmysqladmin]
D:\Program Files\mysql\mysql-5.6.13-win32\bin\mysqld.exe
#########################################################
3. Add Environment variables
The operation is as follows:
1) Right-click My Computer, properties, advanced system settings (advanced), environment variables
Click the New button under System variables
Input variable name: mysql_home
Input variable value: D:\Program files\mysql-5.6.11-winx64
#即为mysql的自定义解压目录.
2) Select path in the system variable
Click the Edit button
To add a variable value to a variable value:%mysql_home%\bin
Note that this variable is added after the value of the original variable, separated from it, and cannot delete the original variable value.
4. Registering MySQL as a Windows system service
1) from the console into the bin directory under the MySQL decompression directory:
2) Enter the Service installation command:
Mysqld Install MySQL--defaults-file= "D:\Program Files\mysql\mysql-5.6.13-win32\my.ini"
#解压目录下修改的my. ini file
A successful installation will prompt the service to install successfully.
#注: The My.ini file is placed in the root directory after MySQL decompression
#移除服务命令为: Mysqld Remove
5. Start the MySQL service
Method One:
The Start service command is: net start MySQL
Method Two:
Open the Administration Tools service and locate the MySQL service.
Start the service by right-clicking to start or by tapping on the left-hand boot directly.
6. Change the password of the root account
The default password for the root account is empty when the installation is complete, and you can modify the password to the specified password. Example: 123456
C:>mysql–uroot
Mysql>show databases;
Mysql>use MySQL;
Mysql>update user SET Password=password ("123456") WHERE user= ' root ';
Mysql>flush privileges;
Mysql>quit
7. mysql Console shortcut established:
1) object location input, new shortcut, right-click, Desktop: C:\Windows\System32\cmd.exe
Shortcut name self-defined, OK, shortcut established successfully
2) Right-click the shortcut you just created, and then change the target column to the MySQL startup parameter:
C:\Windows\System32\cmd.exe "D:\Program files\mysql\mysql-5.6.13-win32\bin"/k mysql-uroot-p Inventory
Explanation: cmd path "mysql Path bin directory"/k mysql-u user name-p password database name
3) Click OK to save after the modification, double click the shortcut to connect to MySQL database
MySQL-5.6.13 Install-free version configuration method