国产99久久精品_欧美日本韩国一区二区_激情小说综合网_欧美一级二级视频_午夜av电影_日本久久精品视频

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

MySQLDatabaseAdministration101_MySQL

來源:懂視網 責編:小采 時間:2020-11-09 19:20:31
文檔

MySQLDatabaseAdministration101_MySQL

MySQLDatabaseAdministration101_MySQL:This tutorial will go over some of the fundamentals of MySQL Database Administration and Security.If you arent familiar with MySQL, creating a database and table is a simple proc
推薦度:
導讀MySQLDatabaseAdministration101_MySQL:This tutorial will go over some of the fundamentals of MySQL Database Administration and Security.If you arent familiar with MySQL, creating a database and table is a simple proc

This tutorial will go over some of the fundamentals of MySQL Database Administration and Security.

If you aren’t familiar with MySQL, creating a database and table is a simple process that requires a user with multiple privileges to execute a SQL Statement. The syntax would look something like this:

CREATE DATABASE shop;	
USE shop;	
CREATE TABLE clients(	
id INT NOT NULL AUTO_INCREMENT,	
firstName VARCHAR(30) NOT NULL,	
lastName VARCHAR(30) NOT NULL,	
dept VARCHAR(10) NOT NULL,	
PRIMARY KEY (id)	
);	

For any form of database implementation or administration, there is need for a select group of administrators with ‘ALL’ privileges- these administrators with ALL privileges may GRANT or create additional users to access and utilize the database along with all other access to manipulate or add data into the database.

An administrative account can be created during the initial install and additional users can be added later on.

After the initial install, if there is need for additional administrative accounts, administrative personnel may create an additional administrative account by using the following SQL (Structured Query Language) statement:

CREATE USER 'Ash'@'localhost' IDENTIFIED BY 'pass';	
GRANT ALL PRIVILEGES ON *.* TO 'Ash'@'localhost'	
WITH GRANT OPTION;	

This statement will create an account named ‘Ash’ on the host ‘localhost’ and give access to all databases and all tables with the option to grant new users privileges or revoke existing privileges from existing users.

Administrative personnel also have the opportunity to add additional users with lesser privileges using SQL statements. For example: staff- such as secretaries and other employees that need to access data within certain tables within the database and perform certain tasks; each and every user account can have unique privileges.

Creating a user account is a very simple process, but the complex component requires a plan- which users can access what tables and what actions should these users beable to invoke on them?

In order to create a new user account, administrative personnel may use the following SQL statement:

CREATE USER 'Awesome'@'localhost' IDENTIFIED BY 'pass';	

The above statement would create a user named Awesome for the host- ‘localhost’. No privileges have been added for this account yet, but they can simply be implemented by the appending the following SQL statement to the end of the previous statement:

GRANT SELECT ON shop.clients TO 'Awesome'@'localhost';	

This statement would give the user Awesome the opportunity to query data from the shop table within the clients database only- by using the SELECT statement (i.e. USE clients; SELECT * FROM shop;).

By granting this level of privilege to the user Awesome, the Administrator can also give the user ‘ALL’ privileges to anything within the resources database by using this statement:

GRANT ALL ON resources.* TO 'Awesome'@'localhost';	

The user Awesome would then be able to successfully use the following SQL statement:

USE resources; SELECT * FROM tutorials;	

For personnel such as a secretary who may need to query, insert or update data on just the clients table in the shop database, we could create an account by using the following SQL syntax;

CREATE USER 'secretary'@'localhost' IDENTIFIED BY 'pass';	
GRANT SELECT, INSERT, UPDATE ON shop.clients TO 'secretary'@'localhost'	
WITH MAX_QUERIES_PER_HOUR 50	
MAX_UPDATES_PER_HOUR 50	
MAX_CONNECTIONS_PER_HOUR 5	
MAX_USER_CONNECTIONS 1;	

This will also restrict the secretary to a maximum of: 50 queries per hour, 50 updates per hour, 5 connections per hour and 1 connection at a time.

For other staff that may need to refer to all tables stored in the shop database, but not modify the data in anyway, an Administrator could create an account by using the following SQL syntax:

CREATE USER 'staff'@'localhost' IDENTIFIED BY 'pass';	
GRANT SELECT ON shop.* TO 'staff'@'localhost';	

If a user has already been created, but now is required to have administrative privileges, they can be updated by an administrative account with the GRANT privilege using the following SQL statement:

REVOKE ALL PRIVILEGES ON *.* FROM 'user'@'host';	
GRANT ALL ON *.* TO 'user'@'host';	
FLUSH PRIVILEGES;	

A user may also have some of their privileges revoked, by using the following SQL statement:

REVOKE ALL PRIVILEGES ON *.* FROM 'user'@'host';	
GRANT SELECT ON shop.clients TO 'user'@'host';	
FLUSH PRIVILEGES;	

This will leave the user ‘user’ with just the privilege to only SELECT data in the clients table within the clients database.

I hope you found this resource useful!

聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

MySQLDatabaseAdministration101_MySQL

MySQLDatabaseAdministration101_MySQL:This tutorial will go over some of the fundamentals of MySQL Database Administration and Security.If you arent familiar with MySQL, creating a database and table is a simple proc
推薦度:
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 欧美激情在线精品三区 | 国产 欧美 在线 | 欧美日韩性视频一区二区三区 | 在线观看日韩欧美 | 狠狠色狠狠色综合日日不卡 | 国产一级二级三级 | 欧美日韩国产一区二区三区在线观看 | 亚洲伊人久久综合一区二区 | 久久不射电影网 | 国产精品视频免费视频 | 国产精品久久久久久永久牛牛 | 国产免费播放 | 亚洲第一区在线观看 | 日本特级淫片免费看 | 欧美日韩亚洲无线码在线观看 | 亚洲日韩图片专区第1页 | 伊人久久中文字幕久久cm | 国产精品大全国产精品 | 在线国产毛片 | 任你躁欧美一级在线精品免费 | 夜夜操美女 | 国产69久久精品成人看小说 | 亚洲欧美另类视频 | 97伊人网| 日本三级韩国三级欧美三级 | 国产毛片久久久久久国产毛片 | 欧美另类日韩 | 亚洲国内自拍 | 日本免费一区尤物 | 国产免费一区二区 | 视频在线观看国产 | 精品一区二区三区三区 | 久久精品免费一区二区视 | 欧美另类亚洲 | 久久一区二区三区精品 | 欧美日韩精品在线 | 国产亚洲欧美一区二区三区 | 亚欧美| 国产免费小视频在线观看 | 免费观看h | 亚洲欧美日韩高清 |