MySQL 8.0.19 server installation tutorial

This article is to introduce MySQL 8.0.19 Community Server installation tutorial under Windows10 system

MySQL download

First Quguan website to download the latest version of MySQL Community Server, currently 8.0.19
Download: https://dev.mysql.com/downloads/mysql/
Here Insert Picture Description
after the download page, select the default windows system (you can click the drop-down box to select other operations system)
Here Insert Picture Description
MySQL supports MSI (installed version) and ZIP install (free installation) in two ways, here we choose ZIP version
Here Insert Picture Description
directly please click to start the download
Here Insert Picture Description

installation steps

Decompression

After unzipping the download is complete
Here Insert Picture Description
the mysql-8.0.19-winx64 folder to install the pre-set path, I have here is D: \ Program \ MySQL-Server
Here Insert Picture Description

cmd Change directory

Run as Administrator CMD (operating authority is not enough to avoid the follow-up), switch the drive letter to the bin directory under the installation path
Here Insert Picture Description
as the following conditions, it said access is not enough
Here Insert Picture Description

MySQL initialization

Excuting an order:mysqld --initialize --console

After the execution is complete, the initial password for the root user output, such as: z8.jwKKov5ZA
Here Insert Picture Description
Note: If you do not remember the original password, delete the data directory in the installation path, re-execute the initialize command to generate a new initial password

MySQL Installation Service

Executive order: mysqld --install [服务名](do not add the service name, the default is mysql)
Here Insert Picture Description
if the following conditions, expressed MySQL service already exists, and then run the install command to delete the
Here Insert Picture Description
delete command:sc delete mysql
Here Insert Picture Description

Start MySQL service

Excuting an order:net start mysql
Here Insert Picture Description

Log in MySQL

Bin directory in the installation path of
the command:mysql -h 主机名 -u 用户名 -p

Parameter Description
-h: MySQL host name specified by the client to log in, log in to this machine (localhost or 127.0.0.1) This parameter can be omitted;
-u: username logged;
-p: tell the server will use a password to login the user name and password if you want to log is empty, you can ignore this option.

If Log on MySQL, execute the following command to mysql -u root -p
Here Insert Picture Description
the command prompt will have tomysq> Plus a blinking cursor input waiting command, mysql command needs to perform end with a semicolon, type exit or quit Log

change Password

Executive order: alter user root@localhost identified by ‘新密码’;


Of course, the password can also be modified using third-party tools, bloggers will be introduced next article

Released three original articles · won praise 1 · views 37

Guess you like

Origin blog.csdn.net/weixin_44901301/article/details/104189771