Get the App
SLTechnology News&Howtos  ›  Database  › 

How to establish database permission assignment

Shulou Source: shulou.com Published: 2022-05-31 23:42:34 10月19日 Update

This article will explain in detail how to establish database permission allocation. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

A database is a collection of data organized according to a certain data model and stored in secondary storage. This kind of data set has the following characteristics: it does not repeat as much as possible, serves a variety of applications of a particular organization in an optimal way, and its data structure is independent of the application program that uses it. The addition, deletion, modification and query of data are managed and controlled by unified software. From the history of development, database is the advanced stage of data management, which is developed by file management system.

A simple tutorial on setting up a database and permission assignment.

(1) create a new database travel_db

CREATE DATABASE `travel_ db` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci

(2) create a new user travelUser1, and only this user is allowed to access the travel_db library

Create user `travelUser1`

Update mysql.user set password=password ('pwd123#.O') where User='travelUser1'

Flush privileges

Show grants for `travelUser1`

Grant select,update,delete,insert on travel_db.* to `travelUser1`

Flush privileges

Show grants for `travelUser1`

(3) set rijiAppUser to perform all operations on the travel_db library.

Flush privileges

Grant all on travel_db.* to `travelUser1`

Show grants for `travelUser1`

This is the end of the article on "how to establish database permission allocation". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Data database permissions allocation articles management more users development applications good practical advanced content history variety storage as much as possible application services applications Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Linux Shulou Information Shulou Tech Info macOS