Win10 mysql-5.7.28×64 bit installation

Time:2020-11-21

Download and install

fromOfficial website of MySQLDownload the installation package as shown in the figure below

Win10 mysql-5.7.28x64 bit installation

Unzip Mysql to a user-defined location, and then add the path to the environment variable path where the unzipped bin directory of MySQL is located. For example, mine is: D: mysql-5.7.28-winx64.bin.

As an administrator, execute the following command to install the MySQL service and start it

mysqld -install
mysqld --initialize
net start mysql

Change coding

If you don’t change it, the consequences will be very serious, unless you only use English database
Using commandsshow variables like 'char%';You can view your database code
Remember to restart the database after the change. Previously created tables need to be re created before the coding changes will take effect

Add a new one in the MySQL installation directory my.ini Documents. The contents are as follows:

Win10 mysql-5.7.28x64 bit installation

[client]
port=3306
default-character-set=utf8
[mysqld]
port=3306
character_set_server=utf8
basedir=D:\mysql-5.7.28-winx64
#Unzip directory
datadir=D:\mysql-5.7.28-winx64\data
#Unzip directory下data目录
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[WinMySQLAdmin]
D:\mysql-5.7.28-winx64\bin\mysqld.exe

Change Password

First, get the initial password, as shown in the figure below

Win10 mysql-5.7.28x64 bit installation

MySQL - U root - P ා enter the password you just saw
#Change the password and divide it into old and new versions
set password for  [email protected]  =Password ('123 '); this is what I used
Alter user 'root' @'localhost 'identified by' 123 ';, new, I guess it is 8.0 or above

Reference blog

This work adoptsCC agreementThe author and the link to this article must be indicated in the reprint

Recommended Today

Interviewer: young man, what do you think of the principle of distributed system

1 Concept 1.1 model 1.2 copies 1.3 indicators for measuring distributed systems 2. Principle of distributed system 2.1 data distribution 2.2 basic copy agreement 2.3 lease mechanism 2.4 quorum mechanism 2.5 log technology 2.6 two phase submission protocol 2.7 MVCC 2.8 Paxos protocol 2.9 CAP 1 Concept 1.1 model node In a specific project, a […]