Home > Database > Mysql Tutorial > Graphic tutorial on installing mysql 5.7.17 under windows

Graphic tutorial on installing mysql 5.7.17 under windows

黄舟
Release: 2017-03-15 17:17:22
Original
1172 people have browsed it

This article mainly introduces the graphic tutorial of mysql 5.7.17 installation under windows, which has a certain reference value. Interested friends can refer to it

Started learning recently Database seems to be a very interesting course, but many of the things involved are my first exposure to it. I would like to organize my study notes here. The first thing to sort out is the installation and configuration methods of DBMS MySQL used in the course.

Download address

http://www.php.cn/xiazai/gongju/116

Select the corresponding machine and number of digits, and click download.

Decompression and configuration

1. Decompress the downloaded MySQL compressed package.

2. Modify the configuration file:

Copy and paste the following text into the my.txt file, modify the suffix of my.txt to .ini and replace it with the configuration file (my-default.ini) in the original MySQL installation directory. .


[mysql]
  # 设置mysql客户端默认字符集
  default-character-set=utf8 
  [mysqld]
  #设置3306端口
  port = 3306 
  # 设置mysql的安装目录
  basedir=D:\MySql\mysql-5.7.12-winx64
  # 设置mysql数据库的数据的存放目录
  datadir=D:\MySql\mysql-5.7.12-winx64\data
  # 允许最大连接数
  max_connections=200
  # 服务端使用的字符集默认为8比特编码的latin1字符集
  character-set-server=utf8
  # 创建新表时将使用的默认存储引擎
  default-storage-engine=INNODB
Copy after login

Note: The specific paths of basedir and datadir should be filled in according to the actual installation path. Installation

1. Enter the bin directory and start installing MySQL:

Graphic tutorial on installing mysql 5.7.17 under windows

2. Initialize (create the data directory), in the command line Enter:
mysqld --initialize

3. Install, enter at the command line:
mysqld install

4. Start Service, enter on the command line:
net start mysql
In addition, the command to shut down the service is:
net stop mysql

5. Create user password:
mysql -uroot -p
Enter the password after pressing Enter

EnvironmentVariables

In order to make it easier to switch directories in cmd every time, we add the bin directory of MySQL to the Path environment variable:

Graphic tutorial on installing mysql 5.7.17 under windows

At this point, the installation and configuration of MySQL Already done.

The above is the detailed content of Graphic tutorial on installing mysql 5.7.17 under windows. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template