mysql8.0.11 winx64 installation and configuration method graphic tutorial (win10)

mysql8.0.11 winx64 installation and configuration method graphic tutorial (win10)

The installation tutorial of mysql 8.0.11 winx64 is recorded as follows and shared with everyone

1. Enter the address: Download mysql-8.0.11-winx64

2. Unzip the zip package and put the unzipped files into a folder, as shown in the figure:

3. Configure environment variables (to avoid repeatedly switching paths when operating in the CMD window)

Add D:\Program Files\mysql-8.0.11-winx64\bin under Path

4. Write the configuration file

We found that there is no my.ini (or my-default.ini) file in the unzipped directory. It doesn’t matter, you can create it yourself. Add my.ini in the installation root directory, for example, mine is: D:\Program Files\mysql-8.0.11-winx64\my-default.ini, write the basic configuration:

Note: The data folder exists only after the database is initialized. The my-default.ini file does not exist by default. You can write it yourself as follows:

[mysqld]
# Set port 3306 port=3306
# Set the installation directory of MySQL basedir=D:\Program Files\MySQL
# Set the storage directory of MySQL database data datadir=D:\Users\qiuzhiwen\MySQL\Data
# 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

Among them, basedir and datadir can be determined according to your actual situation!

5. Press the "win" key to open the start menu, enter "cmd" in the search box, select the "Command Prompt" program in the search results, right-click and select "Run as administrator"

6.MySQL service installation and initialization

Execute the mysqld install command. When Service successfully installed appears, it means that the MySQL service installation is complete.

Note: mysqld --install [service name]

The service name behind it can be omitted, the default name is mysql. Of course, if you need to install multiple MySQL services on your computer, you can distinguish them with different names, such as mysql5 and mysql8.

Mysql initialization

Execute the command in the bin directory of the MySQL installation directory:

mysqld --initialize --console

After the execution is complete, the initial default password of the root user will be printed, for example:

Notice! There is a paragraph in the execution output result: [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: Ng*jbnKGd2_! The "Ng*jbnKGd2_!" after root@localhost: is the initial password (excluding the first space). Before changing the password, you need to remember this password as it will be needed for subsequent logins. If you accidentally close the directory too quickly or forget to remember it, it's OK. Just delete the initialized datadir directory and execute the initialization command again, and it will be regenerated. Of course, you can also use security tools to force a password change, using any method you like.

Reference: MySQL 8.0 Reference Manual

After the installation is complete, you can start the MySQL service through the command net start mysql .

7. Change password and password authentication plugin

Go to D:\Program Files\mysql-8.0.11-winx64\bin, execute the mysql -u root -p command, and then enter the previously saved password. In my case, it is Ng*jbnKGd2_!

To change the user password, execute the command in MySQL:

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

Modify the password verification plug-in and modify the password at the same time.

You can use the command to view the default installed database:

show databases;

use mysql;

show tables;

You can see that the MySQL database is initialized by default, and the user table stores MySQL user information. We can take a look at the default MySQL user:

select user,host,authentication_string from mysql.user;

The host of the administrator root is localhost, which means that only localhost login access is allowed. If you want to allow other IP addresses to log in, you need to add a new host. If you want to allow all IP access, you can directly change it to "%"

Create a user:

CREATE USER 'xxh'@'%' IDENTIFIED WITH mysql_native_password BY 'xxh123!@#';

#(Note: the encryption method of mysql8.0 has been changed)# Check user

select user, host, plugin, authentication_string from user\G;

Authorizing Remote Databases

# Authorize all permissions

GRANT ALL PRIVILEGES ON *.* TO 'xxh'@'%';

#Authorize basic query and modification permissions, set as required

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON *.* TO 'xxh'@'%';

View User Permissions

show grants for 'xxh'@'%';

So far, the detailed steps for installing mysql-8.0.11-winx64 on Win10 have been introduced. If there are any mistakes or problems encountered during the installation process, please leave a message in the comment area and LZ will try to answer them!

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:
  • Detailed explanation of the idea of ​​installing mysql8.0.11 and changing the root password and connecting navicat for mysql
  • MySQL 8.0.11 installation summary tutorial diagram
  • How to correctly modify the ROOT password in MySql8.0 and above versions
  • MySQL 8.0.18 installation tutorial under Windows (illustration)
  • How to quickly add columns in MySQL 8.0
  • MySQL 8.0.21 installation tutorial with pictures and text
  • Analysis of the new features of MySQL 8.0 - transactional data dictionary and atomic DDL
  • MySQL 8.0.20 compressed version installation tutorial with pictures and text
  • Detailed explanation of MySQL 8.0 dictionary table enhancement
  • MySQL 8.0.21 installation tutorial under Windows system (illustration and text)
  • Detailed explanation of invisible indexes in MySQL 8.0

<<:  Implementation of one-click packaging and publishing of Vue projects using Jenkins

>>:  Detailed explanation of nginx upstream configuration and function

Recommend

How to deploy services in Windows Server 2016 (Graphic Tutorial)

introduction Sometimes, if there are a large numb...

XHTML three document type declarations

XHTML defines three document type declarations. T...

Using css-loader to implement css module in vue-cli

【Foreword】 Both Vue and React's CSS modular s...

How to introduce Excel table plug-in into Vue

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

Detailed explanation of JavaScript's Set data structure

Table of contents 1. What is Set 2. Set Construct...

How to configure two-way certificate verification on nginx proxy server

Generate a certificate chain Use the script to ge...

Docker+nacos+seata1.3.0 installation and usage configuration tutorial

I spent a day on it before this. Although Seata i...

Several ways to update batches in MySQL

Typically, we use the following SQL statement to ...

Sample code for implementing a background gradient button using div+css3

As the demand for front-end pages continues to in...

Example of using swiper plugin to implement carousel in Vue

Table of contents vue - Use swiper plugin to impl...

Summary of several commonly used CentOS7 images based on Docker

Table of contents 1 Install Docker 2 Configuring ...

Understanding MySQL index pushdown in five minutes

Table of contents What is index pushdown? The pri...

How to create a table by month in MySQL stored procedure

Without going into details, let's go straight...