MySQL 8.0.23 installation super detailed tutorial

MySQL 8.0.23 installation super detailed tutorial

Preface

I am currently working on a face recognition project, which requires using a database to store student information and interact with the front end.

Advantages of MySQL

1. MySQL has excellent performance, stable service, and rarely experiences abnormal downtime.

2. MySQL is open source and has no copyright restrictions, so it has autonomy and low usage costs.

3. MySQL has a long history, and its community and users are very active. If you encounter any problems, you can seek help.

Tip: The following is the main content of this article. The following cases can be used for reference

1. Download MySQL from the official website

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

You can download my version or the version you want. The process is similar.

2. Configure the decompression file

1. Unzip

The decompression directory is consistent with the following configuration directory

2. Configure the my.ini file

There is no my.ini file in the unzipped directory. Add my.ini by yourself and write the following data

[mysqld]
# Set port 3306
port=3306
# Set the installation directory of mysql
basedir=D:\\MySQL\\mysql-8.0.20-winx64 # This is the decompression path of mysql
# Set the storage directory for mysql database data
datadir=D:\\MySQL\\mysql-8.0.20-winx64\\Data # Same as above. Do not create the Data directory in the path first. It will be automatically generated during initialization later.
# 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 new tables
default-storage-engine=INNODB
# By default, the "mysql_native_password" plugin is used for authentication
default_authentication_plugin=mysql_native_password
[mysql]
# Set the default character set for the mysql client
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 to modify the paths of basedir and datadir)

3. Initialization

Run cmd (administrator mode) and cd to the bin folder of the mysql directory

Enter mysqld --initialize --console to initialize. This step can get the initial password of mysql. The string after root@localhost is the initial password. Write it down first, as you will need it later.

//You can also use mysqld --initialize-insecure to initialize. -insecure means ignoring security. In this case, the password of the system "root" user is set to empty. It depends on your choice.

Then execute the following command

mysqld --initialize --console 

Remember the temporary password! ! !

4. Install and start the MySQL service

mysqld --install [service name] 

After installation, it looks like this, then start

net start mysql 

Then you can add environment variables according to your own situation. At this point, MySQL is successfully installed. You can manage your MySQL through other tools such as Navicat .

Follow-up

You can change your password now.

Enter mysql -uroot -p (I tried mysqld -u root -p but it didn't work), log in to mysql using the initial password, and enter the initial password after Enter password

mysql -u root -p 

ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';

After logging in, change the initial password to a password that is easy for you to remember.
Enter ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '自己定義的密碼'; (the semicolon must be included)

Then enter this command to change the password

This step is complete

Enter show databases;, to see which data tables are included.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
|mysql |
| performance_schema |
|sys|
+--------------------+
4 rows in set (0.01 sec)

This is the end of this article about the super detailed tutorial on MySQL 8.0.23 installation. For more relevant MySQL 8.0.23 installation tutorial content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Complete step-by-step record of MySQL 8.0.26 installation and uninstallation
  • Deepin20.1 system installs MySQL8.0.23 (super detailed MySQL8 installation tutorial)
  • mysql8.0.23 linux (centos7) installation complete and detailed tutorial
  • MySQL 8.0.22 decompression version installation tutorial (for beginners only)
  • MySQL 8.0.26 installation and simplified tutorial (the most complete on the Internet)

<<:  PHP related paths and modification methods in Ubuntu environment

>>:  HTML 5 Preview

Recommend

Solve the problem of MySQL using not in to include null values

Notice! ! ! select * from user where uid not in (...

About Zabbix custom monitoring items and triggers

Table of contents 1. Monitoring port Relationship...

Using Openlayer in Vue to realize loading animation effect

Note: You cannot use scoped animations! ! ! ! via...

Xftp download and installation tutorial (graphic tutorial)

If you want to transfer files between Windows and...

Summary of the differences and usage of plugins and components in Vue

The operating environment of this tutorial: Windo...

Regarding the Chinese garbled characters in a href parameter transfer

When href is needed to pass parameters, and the p...

Simple example of HTML text formatting (detailed explanation)

1. Text formatting: This example demonstrates how...

The problem of Vue+tsx using slot is not replaced

Table of contents Preface Find the problem solve ...

How to view the storage location of MySQL data files

We may have a question: After we install MySQL lo...

Detailed explanation of CSS style cascading rules

CSS style rule syntax style is the basic unit of ...

Detailed explanation of CSS3 elastic expansion box

use Flexible boxes play a vital role in front-end...

CenOS6.7 mysql 8.0.22 installation and configuration method graphic tutorial

CenOS6.7 installs MySQL8.0.22 (recommended collec...