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

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題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關(guān)鍵字專題關(guān)鍵字專題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
當(dāng)前位置: 首頁 - 科技 - 知識(shí)百科 - 正文

MySQLDatabaseAdministration101_MySQL

來源:懂視網(wǎng) 責(zé)編:小采 時(shí)間: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
推薦度:
導(dǎo)讀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!

聲明:本網(wǎng)頁內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。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
推薦度:
  • 熱門焦點(diǎn)

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 欧美一区二区三区在线观看 | 国产一区二区三区成人久久片 | 人人草人人澡 | 黄色一级a毛片 | 久久经典视频 | 国产高清在线免费视频 | 老司机精品视频一区二区 | 免费一区二区三区在线视频 | 日韩精品一区二区三区在线观看l | 真实和子乱视频 | 亚洲国产精品婷婷久久久久 | 日本一区二区三区在线播放 | 国产精品手机视频一区二区 | 欧美国产高清 | 亚洲欧美视频在线观看 | 国内精品一区二区 | 亚洲成人一区在线 | 伊人久久大香线蕉综合爱婷婷 | 日产精品久久久一区二区 | 午夜视频在线播放 | 久久久久国产一级毛片高清版 | 91香蕉国产亚洲一区二区三区 | 在线亚洲精品国产成人二区 | 欧美一区二区高清 | 欧美日韩激情 | 最新国产在线视频 | 亚洲激情在线观看 | 日韩亚洲第一页 | 久久久久久久国产高清 | 永久在线毛片免费观看 | 毛片免费网站 | 伊人黄| 国产欧美日韩中文字幕 | 日韩中文在线视频 | 欧美精品久久久亚洲 | 亚洲图欧美 | 国产精品三级在线观看 | 五月天婷婷视频在线观看 | 欧美一区二区三区四区视频 | 成人在线一区二区三区 | 国产不卡精品一区二区三区 |