MySQL 5.7.9 ZIP-Free installation version of the configuration

Source: Internet
Author: User

  1. 1. Unzip the MySQL archive package
    Unzip the downloaded MySQL archive into a custom directory, and my unzip directory is:
    "D:\Program Files\mysql-5.7.9-win32"
    Will unzip the directory under the default file My-default.ini copy one copy, renamed My.ini
    Copy the following configuration information to My.ini save
    #如果没有my-default.ini, you can create your own my.ini or get it from somewhere else.
    #########################################################
    [Client]
    port=3306
    Default-character-set=utf8
    [Mysqld]
    port=3306

    Character_set_server=utf8

    #解压目录

    Basedir=d:\program Files\mysql-5.7.9-win32
    #解压目录下data目录
    Datadir=d:\program Files\mysql-5.7.9-win32\data

    Sql_mode=no_engine_substitution,strict_trans_tables
    [Winmysqladmin]
    D:\Program Files\mysql-5.7.9-win32\bin\mysqld.exe
    #########################################################

    2. Add Environment variables

    The operation is as follows:
    1) Right-click My Computer, properties, advanced system settings (advanced), environment variables
    Click the New button under System variables
    Input variable name: mysql_home
    Input variable value: D:\Program files\mysql-5.7.9-win32
    #即为mysql的自定义解压目录.
    2) Select path in the system variable
    Click the Edit button
    Add a variable value to the value of a variable:%mysql_home%\bin
    Note that this variable is appended to the value of the original variable, separated from it, and cannot be removed from the original variable value.

    3.

    1) from the console into the bin directory under the MySQL decompression directory:

    2) Enter the Service installation command:

    1. Mysqld--console

    2. Mysqld--initialize

    3. Mysqld Install

    A successful installation will prompt the service to install successfully.

    #注: #执行这几步 Because there is no Data folder in MySQL5.7.9, you need to use these commands to generate the Data folder

    #移除服务命令为: Mysqld Remove

    4. Start the MySQL service

    Method One:
    The Start service command is: net start MySQL
    Method Two:
    Open the Administration Tools service and locate the MySQL service.
    Start the service by right-clicking to start or by tapping on the left-hand boot directly.

    5. Change the password of the root account

    1. Modify the MySQL configuration file (My.ini) and add a line under [Mysqld] Skip-grant-tables

    2. After the MySQL restart, you can enter directly with Mysql-u root-p (the password is empty at this time)

    3. mysql> Update Mysql.user set Authentication_string=password (' 123qaz ') where user= ' root ' and Host = ' localhost ';

    4. mysql> flush Privileges;

    5. Mysql> quit;

    6. Restore the/etc/my.cnf file (delete the Skip-grant-tables line) and restart MySQL

    7. This time you can use Mysql-u root-p ' 123qaz ' to enter the

    8. Mysql>set PASSWORD = PASSWORD (' 123456 '); Set a new password

MySQL 5.7.9 ZIP-Free installation version of the configuration

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.