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

Tips and precautions for using MySQL index

1. The role of index In general application syste...

Nginx reverse proxy springboot jar package process analysis

The common way to deploy a springboot project to ...

Can MySQL's repeatable read level solve phantom reads?

introduction When I was learning more about datab...

Implementation of react loop data (list)

First, let's simulate the data coming from th...

W3C Tutorial (15): W3C SMIL Activities

SMIL adds support for timing and media synchroniz...

How to completely uninstall Docker Toolbox

Docker Toolbox is a solution for installing Docke...

MySQL scheduled backup solution (using Linux crontab)

Preface Although some love in this world has a pr...

Details on using order by in MySQL

Table of contents 1. Introduction 2. Main text 2....

Troubleshooting the reasons why MySQL deleted records do not take effect

A record of an online MySQL transaction problem L...

How to use bar charts in Vue and modify the configuration yourself

1. Import echart in HTML file <!-- Import echa...

JavaScript macrotasks and microtasks

Macrotasks and Microtasks JavaScript is a single-...

Detailed explanation of how to exit Docker container without closing it

After entering the Docker container, if you exit ...