Download and installation of MySQL

Source: Internet
Author: User

Download website

https://www.mysql.com/

Click: Downloads>community>mysql Community Server,

Image.png

Image.png

Download the 64-bit zip package to

Installation

1. Extract MySQL to the folder you want to install
2. Configure Environment variables

Add a system environment variable,

Image.png
Add:%mysql_home%\bin in Path, notice that the ";" Symbol between different values in path cannot be saved

3. Prepare the My.ini file, you can create a new My.txt file, and then rename the modified file suffix to. ini, the previous version may exist after decompression My-default.ini file, but 5.7.21 version is not, so you manually created the file, the contents of the file are as follows:

3306 basedir=c:/software/mysql-5.7. -winx64datadir=c:/software/mysql-5.7. -winx64/data max_connections=character-set-server=  UTF8default-storage-engine=innodbsql_mode=No_engine_substitution,strict_trans _tables[mysql]default-character-set=utf8

This step to note: The red box is the MySQL installation path, and the folder with "/" instead of "\", or in the following operation may be an error
After editing the My.ini file, place the My.ini file in the C:\software\mysql-5.7.21-winx64 directory.

4. Open the CMD Command window as an administrator and switch the directory to the bin directory of the MySQL installation directory

Image.png

5. Execute the following command to install MySQL

Mysqld-install
Prompt after executing the command: Service successfully installed. Indicates successful installation

6. Execute the following command to initialize MySQL

Mysqld--initialize-insecure--user=mysql
After executing the command, the data directory is generated in the MySQL installation directory and the root user is created.


Image.png

7. Execute the following command to start the MySQL service

net start MySQL
After execution, you will be prompted with the following:
The MySQL service is starting:
MySQL Service has started successfully

8, after starting MySQL, the root user password is empty, set the password, the command is as follows:

mysqladmin-u root-p Password New password
Enter Password: old password

You need to enter the old password, because the old password is empty, so you can directly enter.

Download and installation of MySQL

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.