Detailed graphic tutorial on how to install the unzipped version of MySQL under Windows 10

Detailed graphic tutorial on how to install the unzipped version of MySQL under Windows 10

MySQL installation is divided into installation version and decompression version. The installation version is mainly installed by an exe program. There is an interface and the mouse can be clicked to install. Xiaobai recommends using the installation version to install MySQL. Compared with the installation version, the decompression version is more "pure" and has no extra things, but it is more complicated and has more pitfalls (all tears). This tutorial is located to provide the correct posture for installing the latest version of MySQL 8.0.11 (funny)

1. Download the compressed package from the MySQL official website

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

Here we choose MySQL Community Server

Click Download

Next, click Skip to download without logging in

2. Unzip the installation package

3. Add the configuration file my.ini in the decompressed directory

The contents of the my.ini file are as follows:

[mysql]
#Set the default character set of MySQL client default-character-set=utf8
[mysqld]
#Set port 3306 port=3306
#Set the installation directory of mysql basedir=D:\program\mysql
#Set the storage directory of mysql database data datadir=D:\program\mysql\data
#Maximum number of connections allowed max_connections=200
#The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8
#The default storage engine that will be used when creating a new table explicit_defaults_for_timestamp=true
default-storage-engine=INNODB

There is a pitfall here. There should be no spaces on either side of the equal sign in the configuration field. Otherwise, the following error may be reported when MySQL is initialized:

4. Install MySQL

Run cmd as an administrator. Note that you must run it as an administrator.

Enter the bin directory of the mysql decompression package:

d:
cd D:\program\mysql\bin

4.1 Execute the start installation command

mysqld install

The prompt "Service successfully installed" indicates that mysqld has been successfully started

4.2 Initialize MySQL database

mysqld --initialize -user=mysql --console

If you don't add the --console parameter, the execution result will not be displayed on the console, and you won't know the MySQL initial password. So for the sake of convenience later, it's best to add it (the first installation is a deception, woo woo). As shown in the figure above, you can see the database initial password. Note: the space character in front is also part of the password (what a pit, what a pit). Anyway, if you really forget to add it (I'm afraid there are not many stupid people like me), there is still a way to find the initial password. You will find that a new data directory has been generated. You can search for the server-key.pem file in the data directory (haha)

4.3 Start MySQL Service

net start mysql

4.4 Log in to MySQL

mysql -uroot -p

After pressing Enter, enter the initial password you just got

4.5 Change password:

After entering, execute show databases; you will find the following figure:

It turns out that after logging in to MySQL, you need to change the password, otherwise you cannot operate the MySQL database (of course, there are ways to force it to use the initial password, but I won’t go into details here, haha~)

Change the password MySQL:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'root123'; 

Note: In the above command 'root' is the username for logging into MySQL, and 'root123' is the password for logging into MySQL. You can set it according to your needs.

4.6 Log in to MySQL

mysql -uroot -proot123

Just execute the command to view the database.

Happy Ending! ! !

Summarize

The above is a detailed graphic tutorial on how to install the unzipped version of MySQL under Windows 10. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Detailed tutorial for installing mysql5.7.21 under Windows
  • Detailed tutorial for installing mysql5.7.21 under Windows system
  • MySQL 5.7.19 installation tutorial under Windows 10 How to change the root password of MySQL after forgetting it
  • Tutorial on installing mysql5.7.17 on windows10
  • MySQL 5.7 installation tutorial (windows)
  • How to install and configure MySQL 8.0.12 decompressed version under Windows 10 with graphic tutorials
  • How to install and uninstall MySQL service under Windows (MySQL 5.6 zip decompression version installation tutorial)
  • Detailed tutorial for installing the unzipped version of mysql5.7.28 winx64 on windows

<<:  How to build Git service based on http protocol on VMware+centOS 8

>>:  Summary of Linux ps and pstree command knowledge points

Recommend

Function overloading in TypeScript

Table of contents 1. Function signature 2. Functi...

A practical record of an accident caused by MySQL startup

Table of contents background How to determine whe...

An article to understand operators in ECMAScript

Table of contents Unary Operators Boolean Operato...

WeChat applet calculator example

This article shares the specific code of the WeCh...

Summary of commonly used tags in HTML (must read)

Content Detail Tags: <h1>~<h6>Title T...

WEB Chinese Font Application Guide

Using fonts on the Web is both a fundamental skill...

Detailed summary of web form submission methods

Let's first look at several ways to submit a ...

Detailed explanation of the solution to docker-compose being too slow

There is only one solution, that is to change the...

Mysql practical exercises simple library management system

Table of contents 1. Sorting function 2. Prepare ...

JavaScript array merging case study

Method 1: var a = [1,2,3]; var b=[4,5] a = a.conc...

MySQL password modification example detailed explanation

MySQL password modification example detailed expl...

The grid is your layout plan for the page

<br /> English original: http://desktoppub.a...