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 hide rar files in pictures

You can save this logo locally as a .rar file and...

Div nested html without iframe

Recently, when doing homework, I needed to nest a ...

In-depth analysis of the Linux kernel macro container_of

1. As mentioned above I saw this macro when I was...

CSS and CSS3 flexible box model to achieve element width (height) adaptation

1. CSS realizes fixed width on the left and adapt...

How to get/calculate the offset of a page element using JavaScript

question By clicking a control, a floating layer ...

HTML5+CSS3 coding standards

The Golden Rule No matter how many people are wor...

Zabbix implements monitoring of multiple mysql processes

Three MySQL instance processes are started on one...

Example code for implementing verification code login in SMS API in Node

1. Node server setup + database connection The op...

CentOS 7 installation and configuration tutorial under VMware10

If Ubuntu is the most popular Linux operating sys...

Docker custom network implementation

Table of contents 1. Customize the network to rea...

Specific use of lazy loading and preloading in js

Delayed loading (lazy loading) and preloading are...

Details of watch monitoring properties in Vue

Table of contents 1.watch monitors changes in gen...

In-depth discussion on auto-increment primary keys in MySQL

Table of contents Features Preservation strategy ...