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

MySQL slow query method and example

1. Introduction By enabling the slow query log, M...

MySQL 5.7.17 winx64 installation and configuration graphic tutorial

I summarized the previous notes on installing MyS...

Vue uses the method in the reference library with source code

The official source code of monaco-editor-vue is ...

Detailed explanation of JavaScript Proxy object

Table of contents 1. What is Proxy? 2. How to use...

Vue implements simple calculator function

This article example shares the specific code of ...

MySQL deadlock routine: inconsistent batch insertion order under unique index

Preface The essence of deadlock is resource compe...

Simply learn various SQL joins

The SQL JOIN clause is used to join rows from two...

MySQL 8.0.19 installation and configuration method graphic tutorial

This article records the installation and configu...

How to build Git service based on http protocol on VMware+centOS 8

Table of contents 1. Cause 2. Equipment Informati...

Html page supports dark mode implementation

Since 2019, both Android and IOS platforms have s...

Detailed explanation of the pitfalls of mixing npm and cnpm

Table of contents cause reason Introduction to NP...

Docker installs mysql and solves the Chinese garbled problem

Table of contents 1. Pull the mysql image 2. Chec...

Vue implements custom "modal pop-up window" component example code

Table of contents Preface Rendering Example Code ...