Zip archive installation of MySQL database

Source: Internet
Author: User

The first step, download the database version you need from the official website, here I use the latest version of the 5.7.15;

    1. Unzip the file you downloaded, I'll name it MySQL Server 5.7, I put it under D:\Program files\
    2. You will find that the new MySQL root directory does not have the Data folder (processed later)
    3. Add a path to the system variable path D:\Program files\mysql Server 5.7, your installation directory, that is, the location of the folder you unzipped. [Mysqld]
    4. To create a new file My.ini in the MySQL installation directory (such as D:\mywork\mysql-5.7.16-winx64), add the following configuration:

[Mysqld]

Basedir=d:\mywork\mysql-5.7.16-winx64

Datadir=d:\mywork\mysql-5.7.16-winx64\data

Port = 3306

Next is the important command.

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

At this point, the Data folder and its contents are created automatically, and the final part generates a random password

    • Mysqld--install MySQL (Install database)

    • net start MySQL (startup database)

    • Mysql-u root-p (login)

    • Enter the random password generated above

    • 连接权限数据库: use mysql; (别忘了最后加分号)

    • (改密码)mysql>update mysql.user set authentication_string=password(‘新密码‘) where user=‘root‘ and Host =‘localhost‘;

    • mysql>flush privileges; #更新权限

    • Quit

Zip archive installation of MySQL database

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.