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

About Zabbix forget admin login password reset password

The problem of resetting the password for Zabbix ...

Vue implements the method of displaying percentage of echart pie chart legend

This article mainly introduces the pie chart data...

HTML table markup tutorial (22): row border color attribute BORDERCOLORLIGHT

Within rows, light border colors can be defined i...

Detailed explanation of JavaScript Promise and Async/Await

Table of contents Overview Four examples Example ...

SQL injection vulnerability process example and solution

Code example: public class JDBCDemo3 { public sta...

Detailed explanation of CSS text decoration text-decoration &amp; text-emphasis

In CSS, text is one of the most common things we ...

CSS Transition expands and collapses elements by changing the Height

A common development need is that we want to coll...

Analysis of the principle of using PDO to prevent SQL injection

Preface This article uses pdo's preprocessing...

Docker deployment RabbitMQ container implementation process analysis

1. Pull the image First, execute the following co...

Native JS to implement the aircraft war game

This article example shares the specific code of ...

Using js to implement the two-way binding function of data in Vue2.0

Object.defineProperty Understanding grammar: Obje...

How to find slow SQL statements in MySQL

How to find slow SQL statements in MySQL? This ma...

How does JS understand data URLs?

Table of contents Overview Getting started with d...

Reasons and solutions for slow MySQL query stuck in sending data

Because I wrote a Python program and intensively ...