How to install MySQL 5.6 in win7

Time:2020-11-21

1、 Download

Mysql: https://dev.mysql.com/downloads/windows/installer/5.6.html Click the download button, and then click start download. You can download without logging in.

在这里插入图片描述

2、 Installation

1. Double click the setup program

在这里插入图片描述

2. Click agree agreement, next step

在这里插入图片描述

3. Select the installation version, select custom, next step

在这里插入图片描述

4. Select MySQL server 5.6 x64, check all of them, and then select the installation path

在这里插入图片描述

Select installation path

在这里插入图片描述

5. Before installation, check the required environment and click execute to execute the necessary environment installation

在这里插入图片描述

6. Perform the installation

在这里插入图片描述

7. Installation successful, next step

在这里插入图片描述

8. The next step is to configure some parameters

在这里插入图片描述

9. Select the server type, set port 3306, and then check advanced settings

在这里插入图片描述

10. Set the password of root user, add new user, next step

在这里插入图片描述

11. Set MySQL’s windows server name and default boot. Next

在这里插入图片描述

12. Set the log parameters and check bin log. For other defaults, check bin log to realize master-slave use.

在这里插入图片描述

13. Set advanced parameters, default is OK, next step

在这里插入图片描述

14. Execute the application configuration, execute, and finish

在这里插入图片描述 在这里插入图片描述

15. Configuration complete, next step

在这里插入图片描述

16. Installation is completed

在这里插入图片描述

17. To verify whether the installation is successful, you can use the third-party tool Navicat for remote connection test, or run the black window at start – > all programs – > MySQL – > and execute show databases;

在这里插入图片描述 在这里插入图片描述

3、 Settings my.ini File (default encoding)

Location: e: MySQL / MySQL data5.6\ my.ini Find MySQL’s my.ini File, you can set the default encoding, the number of concurrent connections, the default engine, and so on


[client]
default-character-set = utf8

[mysql]
default-character-set = utf8

[mysqld]
basedir=E:/MySQL/MySQLServer5.6/
datadir=E:/MySQL/MySQLData5.6/Data
character-set-server=utf8
default-storage-engine=INNODB

After setting, restart the MySQL service, execute Win + R, and enter services.msc , start the service, and then find mysql56 to restart the service

在这里插入图片描述

After the MySQL service is restarted, check whether the code is modified successfully


mysql> show variables like 'character%';

4、 Set up root remote access

Click start – > all programs – > MySQL – > run the black window and execute the remote access command

MySQL > grant all privileges on *. * to 'root' @ '%' identified by 'the password you set' with grant option;
mysql> flush privileges;

在这里插入图片描述 在这里插入图片描述

5、 Set up windows path

1. Configure environment variables: right click “my computer” — > “properties” – > “advanced system settings” — > “environment variables”

2. Set MySQL_ Home creates MySQL in the system variable_ Home variable, the variable value is:


E:\MySQL\MySQLServer5.6

在这里插入图片描述

3. Set path to add variable value in the path variable (existing, no need to create a new one)


%MYSQL_HOME%\bin

在这里插入图片描述

4. In this way, you can use the command to start and stop the MySQL service

Net start mysql56 start MySQL service
Net stop mysql56 stop MySQL service
Note that mysql56 is defined according to the windows server name at the time of installation

mysql -u root -p

在这里插入图片描述

summary

The above is the introduction of win7 installation MySQL 5.6 tutorial diagram, I hope to help you, if you have any questions, please leave me a message, the editor will reply to you in time. Thank you very much for your support to the developeppaer website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!

Recommended Today

PHP 12th week function learning record

sha1() effect sha1()Function to evaluate the value of a stringSHA-1Hash. usage sha1(string,raw) case <?php $str = “Hello”; echo sha1($str); ?> result f7ff9e8b7bb2e09b70935a5d785e0cc5d9d0abf0 sha1_file() effect sha1_file()Function calculation fileSHA-1Hash. usage sha1_file(file,raw) case <?php $filename = “test.txt”; $sha1file = sha1_file($filename); echo $sha1file; ?> result aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d similar_text() effect similar_text()Function to calculate the similarity between two strings. usage similar_text(string1,string2,percent) case […]