Detailed explanation of mysql.user user table in Mysql

Detailed explanation of mysql.user user table in Mysql

MySQL is a multi-user managed database that can assign different permissions to different users, which are divided into root users and ordinary users. The root user is the super administrator and has all permissions, while ordinary users have specified permissions.

MySQL controls user access to the database through permission tables, which are stored in the MySQL database. The main permission tables are as follows:

user,db,host,table_priv,columns_priv and procs_priv. Let's first learn about the user table.

User column (information that users need to enter to connect to the MySQL database)

Host: Host name, one of the dual primary keys. When the value is %, it means matching all hosts. User: User name, one of the dual primary keys. Password: Password name.

Host User Password
% domain_check *55B565DA3839E5955A68EA96EB735
localhost domain_check *55B565DA3839E5955A68EA96EB735
127.0.0.1 domain_check *55B565DA3839E5955A68EA96EB735
126.26.98.25 domain_check *55B565DA3839E5955A68EA96EB735
localhost
::1 root *26C378D308851D5C717C13623EFD6
localhost root *26C378D308851D5C717C13623EFD6
127.0.0.1 root *26C378D308851D5C717C13623EFD6

  • (root,%), indicating that remote login is possible and any terminal other than the server
  • (root,localhost), which means you can log in locally, that is, you can log in on the server
  • (root,127.0.0.1 ) means you can log in locally, that is, you can log in on the server
  • (root,sv01) means that the host name is sv1 and can be logged in. The specific machine sv01 refers to can be checked by cat /etc/hostname
  • (root,::1) means the local machine can log in. The passwords are the same. The specific meaning of ::1 is to be checked.

Permission column

The permission column determines the user's permissions and describes the operations that the user is allowed to perform on the database and database tables globally. The field type is Enum and the value can only be Y or N. Y means permission and N means no permission.

Permission Field Name Notes
Select_priv Determines whether the user can select data through the SELECT command
Insert_priv Determines whether the user can insert data through the INSERT command
Delete_priv Determines whether the user can delete existing data via the DELETE command
Update_priv Determines whether the user can modify existing data via the UPDATE command
Create_priv Determines whether the user can create new databases and tables
Drop_priv Determines whether the user can delete existing databases and tables

The above is all the knowledge points about the detailed explanation of the mysql.user user table in Mysql. Thank you for your support to 123WORDPRESS.COM.

You may also be interested in:
  • A brief analysis of the difference between drop user and delete from mysql.user

<<:  How to implement the Vue mouse wheel scrolling switching routing effect

>>:  Detailed installation instructions for the cloud server pagoda panel

Recommend

Detailed explanation of the application of CSS Sprite

CSS Sprite, also known as CSS Sprite, is an image...

Let's talk about Vue's mixin and inheritance in detail

Table of contents Preface Mixin Mixin Note (dupli...

JS realizes video barrage effect

Use ES6 modular development and observer mode to ...

Example method of deploying react project on nginx

Test project: react-demo Clone your react-demo pr...

JavaScript to achieve the effect of clicking on the self-made menu

This article shares the specific code of JavaScri...

mysql delete multi-table connection deletion function

Deleting a single table: DELETE FROM tableName WH...

MySQL performance optimization: how to use indexes efficiently and correctly

Practice is the only way to test the truth. This ...

MySQL 5.6 binary installation process under Linux

1.1 Download the binary installation package wget...

Enable sshd operation in docker

First, install openssh-server in docker. After th...

Stealing data using CSS in Firefox

0x00 Introduction A few months ago, I found a vul...

Two ways to use react in React html

Basic Use <!DOCTYPE html> <html lang=&qu...

A brief discussion on the Linux kernel's support for floating-point operations

Currently, most CPUs support floating-point units...

Talking about ContentType(s) from image/x-png

This also caused the inability to upload png files...