Mysql5.7.20 on Windows Installation Guide

Source: Internet
Author: User
Tags mysql version

Installation Environment

    • Windows version: Windows10 64bit
    • MySQL version: MySQL5.7.20

Configuration process

1. Download mysql Community Server (download link)

    • Download the appropriate version according to your operating system

    • Click "No thanks,just ..." below the page in the Jump page to access the download

2. Unzip the MySQL Server

    • Unzip the downloaded mysql-5.7.20-winx64. zip , unzip the folder to be stored according to your needs
    • Example to store the extracted files directly under the F Drive and rename the folder to MySQL

3. Configure environment variables for MySQL

    • Go to the "system" option under control Panel

    • Select "Advanced system Settings" on the left

    • Click on "Environment variables" in the "System familiarity" panel

    • Under "User Variables", create a new variable named "mysql", assigned to the MySQL storage address, click " OK "

    • Under User variables, find the "Path" variable (if there is no new one), add a value %mysql%\bin, and click " OK "

    • Click " OK " in the environment variable configuration panel and the System Properties panel

4. Registering the MySQL service

    • Right-click the Start menu button and select " command Prompt (administrator)"
    • Go to the Bin directory under the MySQL folder, execute the command mysqld-install, and register the MySQL service. do not close the command prompt when you are finished registering.

5. Configure MySQL

    • The Data folder is not in the folder after Mysql5.7 ()

    • Command initialization is required to generate the Data folder automatically

mysqld--initialize-insecure--user=mysql

    • MySQL after 5.7.18 does not have a My.ini configuration file, nor does it have a My-default.ini profile. In fact, you do not need to configure these two files, you can directly start MySQL, execute commands

net start MySQL

6.MySQL Basic Operation

    • If you add the path of the bin directory of the MySQL installation directory to the path variable of the system environment variable, MySQL can be manipulated globally

    • Log in to MySQL database, default login user name is root, password is empty
    • Execute command mysql-u root-p, use the ENTER key directly when entering the password

    • Initialize password
    • Execute command flush privileges; Refresh Permissions
    • Execute Command grant all privileges on * * to ' root ' @ ' localhost ' identified by ' You want to set the password ' with GRANT option;
    • Execute command flush privileges; Refresh the new root password

7. End MySQL Service

    • Execute command exit ; exit MySQL
    • Execute the command net stop MySQL

Mysql5.7.20 on Windows Installation Guide

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.