MySQL version 5.7 or above download and install

Source: Internet
Author: User
Tags mysql client

First, download

1.mysql Official website: https://downloads.mysql.com/archives/community/

    

2. After the download is done, unzip

    

3. Place your location and put the unpacked folder in your preferred location

Second, configure MySQL

1.mysql-5.7.17-winx64 directory, create a new My.ini. Copy the following code to save it. My.ini will replace the following My-default.ini file.

    

Note: The contents of the My.ini file:   

[MySQL]

; Set the MySQL client default character set

Default-character-set=utf8

[Mysqld]

; Set Port 3306

Port = 3306

; Set up the installation directory for MySQL

Basedir=f:\mysql-5.7.10-winx64

; Set up the data storage directory for the MySQL database

Datadir=f:\mysql-5.7.10-winx64\data

; Maximum number of connections allowed

max_connections=200

; The character set used by the service side defaults to the 8-bit encoded latin1 character set

Character-set-server=utf8

; Default storage engine that will be used when creating a new table

Default-storage-engine=innodb

Third, install the MySQL service

1. Right-click the Start button to select Search input cmd, a command prompt right-click to run this option as an administrator, or there will be an insufficient ID error code

    

2. After opening the CMD window as an administrator, switch the directory to the bin directory of your extracted files. Re-enter mysqld install Enter to run it, note that mysqld is not MySQL. The installation will be successful. Since I've already installed it, I've seen this.

    

3. We can first initialize the data directory with mysqld--initialize:

    

Iv. Change of password

1. My.ini configuration file [Mysqld] entry under Add a command skip-grant-tables, and then restart MySQL

    

2.

(1) Enter MySQL database:

mysql> Use mysql;database changed

(2) Set a new password for the root user mysql> update user set Authentication_string=password ("New password") whereuser= "root";

Query ok,1 rows affected (0.01sec) rows matched:1 changed:1warnings:0

(3) Refresh the database (be sure to remember to refresh) Mysql>flush privileges; Queryok, 0 rows Affected (0.00 sec)

(4) Quit mysql:mysql> quit

Finally, the skip-grant-tables in the configuration file is commented out. The next time you enter Mysql-uroot-p, you can log in with your new password

    

MySQL version 5.7 or above download and install

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.