mysql-8.0.16 winx64 latest installation tutorial with pictures and text

mysql-8.0.16 winx64 latest installation tutorial with pictures and text

I just started learning about databases recently. The first thing I did was to understand what a database is and the basic operations of a database and data tables. This brought me to a problem: the installation of MySQL. I downloaded the 64-bit version, based on Windows. The following is the installation process on my computer. I hope it can help everyone.

1. Download it from the official website of MySQL. The link is https://dev.mysql.com/downloads/mysql/, as shown in Figures 1-1 and 1-2. Click downloads, and then Figure 1-3 will pop up. Click No thanks, just start my download. Of course, you can also register.

Figure 1-1

Figure 1-2

Figure 1-3

2. Choose your own installation path. I downloaded it to disk D. After downloading, a compressed package of MySQL will appear, and then decompress it to the current path;

3. Then configure the environment variables, click Computer->Properties->Advanced System Configuration->Environment Variables; first set the system variables, as shown in Figure 3-1 and 3-2:

Figure 3-1

Figure 3-2

4. After this step, open the mysql-8.0.16-winx64 file, create a new file named my.ini in the current directory, then open the file and add the following code to the file;

Figure 4-1

Note: The content of my.init file is as follows:

[mysqld]
# Set port 3306 port=3306
# Set the installation directory of mysql to basedir=D:\MySQL\mysql-8.0.16-winx64
# Set the storage directory of MySQL database data datadir=D:\MySQL\Database
# Maximum number of connections allowed max_connections=200
# The number of connection failures allowed. This is to prevent someone from trying to attack the database system from this host max_connect_errors = 10
# The default character set used by the server is UTF8
character-set-server=utf8
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB
# By default, the "mysql_native_password" plug-in is used for authentication. default_authentication_plugin=mysql_native_password
[mysql]
# Set the default character set of the mysql client to default-character-set=utf8
[client]
# Set the default port used by the mysql client to connect to the server port = 3306
default-character-set=utf8

Note: Set the installation directory of MySQL and the storage directory of MySQL database data in the my.ini file. The storage directory is to add a data storage directory under the installation directory. I add Database here, as shown in Figure 4-2 and 4-3:

Figure 4-2

Figure 4-3

5. Then use the cmd command prompt. First, enter your installation directory. My installation directory is drive D, D:\MySQL\mysql-8.0.16-winx64\bin. Perform the corresponding process in this directory and enter the command mysqld --initialize --console. The result shown in Figure 5-2 will appear, and the password will be displayed at this time, as marked in the figure. You should record this password at this time, as it will be used for logging in later.

Figure 5-1

Figure 5-2

6. At this step, enter the command mysqld install . What I have shown here is that it has been installed. As shown in Figure 6-1:

Figure 6-1

7. After completing the above steps, enter the command mysql -u root -p on the command prompt. If you press Enter, an error message will be displayed, as shown in Figure 7-1. Because there is a password in the fifth step, you only need to enter the password, as shown in Figure 7-2.

Figure 7-1

Figure 7-2

8. If you think the previous password is too complicated, you can set another login password. After step 7, you will find that there is a cursor flashing after mysql>. At this time, you enter alter user root@localhost identified by '新密碼' . If OK appears, it means that your password has been changed successfully. Just wait until the next time you log in and enter the new password.

The installation is now complete. If you want to exit MySQL, just enter exit after mysql>.

Summarize

The above is the latest installation tutorial of mysql-8.0.16 winx64 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor 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:
  • mysql 8.0.16 winx64.zip installation and configuration method graphic tutorial
  • The latest graphic tutorial of mysql 8.0.16 winx64 installation under win10
  • MySQL 8.0.16 winx64 installation and configuration method graphic tutorial under win10
  • MySQL 8.0.16 winx64 installation and configuration method graphic tutorial
  • MySQL 8.0.16 compressed version download and installation tutorial under Win10 system
  • Installation and configuration tutorial of MySQL 8.0.16 under Win10

<<:  Linux installation steps for Jenkins and various problem solving (page access initialization password)

>>:  Implementation of dynamic particle background plugin for Vue login page

Recommend

CSS to achieve Skeleton Screen effect

When loading network data, in order to improve th...

How to introduce Excel table plug-in into Vue

This article shares the specific code of Vue intr...

Three JavaScript methods to solve the Joseph ring problem

Table of contents Overview Problem Description Ci...

Docker custom network detailed introduction

Table of contents Docker custom network 1. Introd...

Troubleshooting the cause of 502 bad gateway error on nginx server

The server reports an error 502 when synchronizin...

React+ts realizes secondary linkage effect

This article shares the specific code of React+ts...

How to import CSS styles into HTML external style sheets

The link-in style is to put all the styles in one...

The process of installing Docker in Linux system

In this blog, I will walk you through the process...

How to install Docker and configure Alibaba Cloud Image Accelerator

Docker Installation There is no need to talk abou...

Detailed tutorial on installing mysql on centos 6.9

1. Confirm whether MySQL has been installed. You ...

Solution to the error when importing MySQL big data in Navicat

The data that Navicat has exported cannot be impo...

Implementation of MySQL master-slave status check

1. Check the synchronization status of A and B da...

Implementation of the Pycharm installation tutorial on Ubuntu 18.04

Method 1: Download Pycharm and install Download a...

Summary of common knowledge points required for MySQL

Table of contents Primary key constraint Unique p...