MySQL 8.0.16 winx64 installation and configuration method graphic tutorial

MySQL 8.0.16 winx64 installation and configuration method graphic tutorial

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 from the official website of MySQL, as shown in Figure 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 'new password'. 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>.

The MySQL installation was successful! If you have any questions or any deficiencies, please point them out. I hope this can help everyone!

Wonderful topic sharing:

MySQL different versions installation tutorial

MySQL 5.7 installation tutorials for various versions

MySQL 5.6 installation tutorials for various versions

mysql8.0 installation tutorials for various versions

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • MySQL 8.0.16 installation and configuration method graphic tutorial under Windows
  • mysql installer community 8.0.16.0 installation and configuration graphic tutorial
  • MySQL 8.0.16 installation and configuration tutorial under Windows 10
  • MySQL 8.0.16 compressed package installation and configuration method graphic tutorial
  • Steps for installing MySQL 8.0.16 on Windows and solutions to errors
  • MySQL 8.0.16 installation and configuration tutorial under CentOS7
  • MySql 8.0.16-win64 Installation Tutorial
  • Installation and configuration tutorial of MySQL 8.0.16 under Win10
  • mysql 8.0.16 winx64.zip installation and configuration method graphic tutorial
  • MySQL 8.0.16 installation and configuration graphic tutorial under macOS

<<:  Detailed explanation of as, question mark and exclamation mark in Typescript

>>:  Detailed Tutorial on Installing VirtualBox 6.0 on CentOS 8 / RHEL 8

Recommend

Vue codemirror realizes the effect of online code compiler

Preface If we want to achieve the effect of onlin...

How to implement digital paging effect code and steps in CSS

A considerable number of websites use digital pagi...

How to make CSS child elements highly consistent with parent elements

Absolute positioning method: (1) Set the parent e...

A brief introduction to MySQL functions

Table of contents 1. Mathematical functions 2. St...

html page!--[if IE]...![endif]--Detailed introduction to usage

Copy code The code is as follows: <!--[if IE]&...

MySQL uses frm files and ibd files to restore table data

Table of contents Introduction to frm files and i...

The latest version of MySQL5.7.19 decompression version installation guide

MySQL version: MySQL Community Edition (GPL) ----...

How to choose the right MySQL datetime type to store your time

When building a database and writing a program, i...

Problems and solutions when installing and using VMware

The virtual machine is in use or cannot be connec...

CentOS 8.0.1905 installs ZABBIX 4.4 version (verified)

Zabbix Server Environment Platform Version: ZABBI...

js to realize the function of uploading pictures

The principle of uploading pictures on the front ...

Implementation idea of ​​left alignment of the last row of flex box layout

Using flex layout, if it is a nine-square grid, i...

Vue encapsulation component tool $attrs, $listeners usage

Table of contents Preface $attrs example: $listen...

Centos 7 64-bit desktop version installation graphic tutorial

If you think the system is slow and want to chang...

Mysql uses stored procedures to quickly add millions of data sample code

Preface In order to reflect the difference betwee...