Home > Database > Mysql Tutorial > Detailed introduction to the download and installation of mysql5.7 or above (pictures and texts)

Detailed introduction to the download and installation of mysql5.7 or above (pictures and texts)

黄舟
Release: 2017-03-24 13:47:13
Original
1320 people have browsed it

This article mainly introduces mysql 5.7 or above version download and installation The graphic tutorial is very good and has reference value. Friends who need it can refer to it

1. Download

 1. mysql official website download

2. Unzip after the download is complete, as shown in the figure after decompression:

## 3. Place the location, Place the unzipped folder in your favorite location

2. Configure mysql

 1.mysql-5.7.17-winx64 directory Next, create a new my.ini. Copy the following code and save it. My.ini will replace the following my-default.ini file

#Note: my. ini file content:

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

3. Install the mysql service 1. Right-click the start button and select

Search

Enter cmd, a command prompt will appear, right-click and select the option to run as administrator, otherwise an insufficient identity error code

will appear 2. Open as administrator After opening the cmd window, change the directory to the bin directory of your unzipped file. Then enter mysqld install and press Enter to run it. Note that the installation is successful because I have already installed it.

3. At this time, we can use mysqld --initialize to initialize the data directory first:

##4. Change the password

## 1. Add a command skip-grant-tables to the entry of my.iniconfiguration file[mysqld], and then restart mysql

 2.

  (1)Enter the mysql database:

  mysql> use mysql;Database changed

(2) Set a new password for the root user mysql> update user set authentication_string=password("new password") whereuser="root";

  Query OK,1 rows affected(0.01sec)Rows matched:1 Changed :1Warnings: 0

   (3) Refresh the database (be sure to remember to refresh) mysql>flush privileges; QueryOK, 0 rows affected (0.00 sec)

   (4) Exit mysql: mysql> quit

Finally, remove the skip-grant-tables

comment

in the configuration file. Next time you enter mysql -uroot -p, you can log in with the new password

The above is the detailed content of Detailed introduction to the download and installation of mysql5.7 or above (pictures and texts). 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