MySQL 5.7 and above uncompressed version configuration installation

Source: Internet
Author: User

Source: http://jingyan.baidu.com/article/8cdccae946133f315513cd6a.html

Red part for me to add

MySQL version 5.7 and above is different from the previous configuration, here to share with you experience.

Tools/Materials
    • MySQL 5.7 and later zip packages
    • Windows 7 and later
Method/Step
  1. Unzip

    Unzip the downloaded file to your favorite location, such as my own location is D:\Program files\mysql-5.7.10-winx64

  2. Adding environment variables

    Environment variables, high-level system settings, properties, right-click Computers, locate path in the system variable, select Edit, and add the MySQL bin directory at the end of the original value, for example my is D:\Program files\ Mysql-5.7.10-winx64\bin; (note or modify is added with a semicolon)(personal experience: In the path of the user variable to prevent the entire system from being scrambled)

  3. Add a configuration file

    Under the MySQL installation directory (for example, my D:\Program files\mysql-5.7.10-winx64), create a new TXT file and name it My.ini (note that the extension is also modified).

    (Personal Experience : Copy the My-default.ini directly to the name on the line)

    Double-click to open the file and add the following to it:

    [Mysqld]

    Basedir=d:\program files\mysql-5.7.10-winx64

    Datadir=d:\program Files\mysql-5.7.10-winx64\data

    Port = 3306

    Close after saving

  4. Initializing the database

    Open cmd as an administrator to execute the following commands (note that you must open as an administrator or report an error)

    Mysqld--initialize--user=mysql--console

    A randomly generated initial password appears at the end of the console message (because there are special characters, it's easy to remember, it's best to keep the whole message in Notepad)

    (Personal Experience : If not noted, you can also look at the "computer name. Err" file, at the end of the password)

  5. Add MySQL to System services

            Open cmd as Administrator to execute the following command (note that you must open as an administrator, otherwise error)

    (personal experience : My computer goes to the MySQL directory and executes the following command.

    Mysqld --install mysql

    Net start MySQL

    Span style= "color: #ff0000;" > (personal

    Successful installation, display "service started successfully"

  6. Start MySQL and change the password

    Execute commands in the cmd console mysql-u root-p

    Enter the random password that you just recorded after you execute the carriage return

    After successful execution, the console displays Mysql>

    Input command set password for [email protected] = password (' 123 '); (Note semicolon)

    ( There is no password field in the user table in the new MySQL database , but the encrypted user password is stored in the authentication_string field )

    At this point the root user's password is modified to 123

    END
Precautions
    • If the above command does not work correctly, go to the Bin folder of the installation directory to run
    • My.ini location can have many places, personally feel for the convenience of the next modification, should be placed in the installation directory

MySQL 5.7 and above uncompressed version configuration installation

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.