mysql-8.0.20 windows 64-bit latest installation tutorial

First download the MySQL installation package from the official website

Website: https://dev.mysql.com/downloads/mysql/

Choose this to download directly without logging in 

 

Official website download address

 

 Catalog after download

Need to add my.ini file in the original unzipped root directory

Then copy the following content into the text

[mysqld]
# Set 3306 port
port=3306
# Set mysql installation directory
basedir=D:\\Program Files\\MySQL
# Set mysql database data storage directory
#datadir=D:\\Program Files\\MySQL\\ Data 
# Allow the maximum number of connections
max_connections=200
# Allow the number of connection failures.
max_connect_errors=10
# The character set used by the
server defaults to utf8mb4 character-set-server=utf8mb4
# The default storage engine that will be used when creating a new table
default-storage-engine=INNODB
# The "mysql_native_password" plug-in authentication is used by default
#mysql_native_password
default_authentication_plugin= mysql_native_password
[mysql]
# Set the default character set of the mysql client
default-character-set=utf8mb4
[client]
# Set the port used by default when the mysql client connects to the server
port=3306
default-character-set=utf8mb4

Need to manually configure the Data folder Need to modify the configuration in my.ini  I put mysql on the E drive 

 

Need to add mysql to the system environment variables 

 

Then open the cmd command in the bin directory of mysql for subsequent operations (install shift in the current directory and right click will come out)

 

 Execute the MySQL installation command: mysqld --initialize --console

After the installation is successful, remember the first identification password of the data layer for later modification

 

Execute the command to install the MySQL service: mysqld --install

Execute the command to start the MySQL service net start mysql 

Then when changing the password, if you do not change the password and use Navicat to connect to MySQL, it will report 1862 error

Execute the modify password command mysqladmin -uroot -p password

Then use Navicat to connect

 

Guess you like

Origin blog.csdn.net/qq_39008613/article/details/106120091