MySQL 8.0.22 winx64 installation and configuration method graphic tutorial

MySQL 8.0.22 winx64 installation and configuration method graphic tutorial

The database installation tutorial of MySQL-8.0.22-winx64 is for your reference. The specific contents are as follows

1. Installation steps

Directly unzip the installation package to the installation directory.

2. Add system variable path

Enter the path where the decompressed bin is located and configure the path in the path environment.


3. Create a new configuration file

For example, the bin path after decompression is (such as C:\Program Files\mysql-5.6.41-winx64\bin) Create a new configuration file in the decompressed path (such as C:\Program Files\mysql-5.6.41-winx64\)

[mysql]
# Set the default character set of the mysql client to default-character-set=utf8
 
[mysqld]
# Set port 3306 port = 3306
# Set the installation directory of mysql basedir=C:\\Mysql\\mysql-8.0.17-winx64
# Set the storage directory for the MySQL database data. MySQL 8+ does not require the following configuration, the system can generate it by itself, otherwise an error may be reported # datadir=C:\\Mysql\\mysql-8.0.17-winx64\\data
# Maximum number of connections allowed max_connections=20
# 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 default-storage-engine=INNODB

Note: By default, new files are created in Windows.txt files, and the suffix needs to be changed to ini. Also note that the encoding rule of the my.ini configuration file must be ANSI, otherwise an error will be reported when running the installation code.

4. Open a command line as an administrator and switch the directory to the bin directory where you unzipped the file.

Tips: Select the command window to run with administrator privileges, and then enter step by step.

5. Initialize Mysql . After Mysql8.0, the data folder is automatically generated. The following code selects the appropriate one.

mysqld --initialize-insecure (recommended, do not set a root password)
 
//The generated password may be accidentally entered incorrectly or forgotten during the actual connection, resulting in failure to connect to MySQL
mysqld --initialize --console (not recommended, generates a random root password in the console)

/p>

Note: If you are prompted that something is missing when running, it means that the Microsoft runtime library is missing and needs to be downloaded and installed.

6. Install mysql

//Install mysql service mysqld install mysql
 
//Uninstall mysql service sc delete mysql (requires administrator privileges)
 
//Remove mysql service (need to stop mysql)
mysqld -remove

After the command is successfully executed, Service successfully installed will usually appear.

7. Enable MySQL service

net start mysql 

8. Log in to Mysql

mysql -uroot 

9. Set (change) password

//Switch database to use mysql;
 
//Change the root user's password to 225514 and set it yourself as needed alter user 'root'@localhost identified by '225514';
 
//Flush privileges. Generally, flush privileges is required when changing passwords or authorizing users.
 
 // Exit mysql, both can exit the database normally quit
 exit 

Note: The password function cannot be used to modify passwords after MySQL 8.0!

10. Re-login to the database

//After pressing Enter, enter the correct password and the mysql -uroot -p

11. After the installation is complete, because the encoding version is too new, you need to change the password encoding rules, otherwise other software will not be able to connect to the database.

After the cmd window enters the database, run the following code:

alter user 'root'@'localhost' identified with mysql_native_password by 'root';
flush privileges;

This is the end of the introduction to MySQL 8.0.22 installation and configuration. Welcome to give us more advice, communicate with each other, and learn together.

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.22 compressed package complete installation and configuration tutorial diagram (tested and effective)
  • Detailed tutorial on installing and configuring MySql5.7 on Ubuntu 20.04
  • MySQL 8.0.22.0 download, installation and configuration method graphic tutorial
  • MySQL 8.0.22 installation and configuration method graphic tutorial under Windows 10
  • MySQL 8.0.22 download, installation and configuration method graphic tutorial
  • Detailed tutorial on MySQL installation and configuration

<<:  HTML set as homepage and add to favorites_Powernode Java Academy

>>:  JavaScript single thread and asynchronous details

Recommend

How to handle forgotten passwords in Windows Server 2008 R2

What to do if you forget Windows Server 2008R2 So...

Nine advanced methods for deduplicating JS arrays (proven and effective)

Preface The general methods are not listed here, ...

How to optimize MySQL performance through MySQL slow query

As the number of visits increases, the pressure o...

Differences between Windows Server 2008R2, 2012, 2016, and 2019

Table of contents Common version introduction Com...

The easiest way to install MySQL 5.7.20 using yum in CentOS 7

The default database of CentOS7 is mariadb, but m...

A brief discussion on the role of the docker --privileged=true parameter

Around version 0.6, privileged was introduced to ...

How to implement controllable dotted line with CSS

Preface Using css to generate dotted lines is a p...

Detailed explanation of MySQL backup and recovery practice of mysqlbackup

1. Introduction to mysqlbackup mysqlbackup is the...

How to use Nginx proxy to surf the Internet

I usually use nginx as a reverse proxy for tomcat...

How to use axios to filter multiple repeated requests in a project

Table of contents 1. Introduction: In this case, ...

Vue implements picture verification code when logging in

This article example shares the specific code of ...

Use Javascript to develop sliding-nav navigation plug-in with sliding bar effect

Table of contents 1. Introduction 2. Usage 3. Dev...

How to use Linux locate command

01. Command Overview The locate command is actual...

Draw a heart with CSS3

Achieve resultsRequirements/Functionality: How to...