標(biāo)題索引
創(chuàng)新互聯(lián)建站擁有網(wǎng)站維護(hù)技術(shù)和項(xiàng)目管理團(tuán)隊(duì),建立的售前、實(shí)施和售后服務(wù)體系,為客戶提供定制化的做網(wǎng)站、網(wǎng)站建設(shè)、網(wǎng)站維護(hù)、德陽電信服務(wù)器托管解決方案。為客戶網(wǎng)站安全和日常運(yùn)維提供整體管家式外包優(yōu)質(zhì)服務(wù)。我們的網(wǎng)站維護(hù)服務(wù)覆蓋集團(tuán)企業(yè)、上市公司、外企網(wǎng)站、商城網(wǎng)站定制開發(fā)、政府網(wǎng)站等各類型客戶群體,為全球超過千家企業(yè)提供全方位網(wǎng)站維護(hù)、服務(wù)器維護(hù)解決方案。官方幫助
常用案例
官方幫助
在使用數(shù)據(jù)庫時必不可少的即是查看help幫助,通過help幫助再次尋找常用命令及參數(shù),如下為help grant信息:
MariaDB [(none)]> help grant; Name: 'GRANT' Description: Syntax: GRANT priv_type [(column_list)] [, priv_type [(column_list)]] ... ON [object_type] priv_level TO user_specification [, user_specification] ... [REQUIRE {NONE | ssl_option [[AND] ssl_option] ...}] [WITH with_option ...] GRANT PROXY ON user_specification TO user_specification [, user_specification] ... [WITH GRANT OPTION] object_type: TABLE | FUNCTION | PROCEDURE priv_level: * | *.* | db_name.* | db_name.tbl_name | tbl_name | db_name.routine_name user_specification: user [ IDENTIFIED BY [PASSWORD] 'password' | IDENTIFIED WITH auth_plugin [AS 'auth_string'] ] Normally, a database administrator first uses CREATE USER to create an account, then GRANT to define its privileges and characteristics. For example: CREATE USER 'jeffrey'@'localhost' IDENTIFIED BY 'mypass'; GRANT ALL ON db1.* TO 'jeffrey'@'localhost'; GRANT SELECT ON db2.invoice TO 'jeffrey'@'localhost'; GRANT USAGE ON *.* TO 'jeffrey'@'localhost' WITH MAX_QUERIES_PER_HOUR 90;常用配置
1.授權(quán)單位普通DBA或運(yùn)維人員增刪改查命令
MariaDB [(none)]> create table performance( id int, server_name varchar(20), Adress_City varchar(30) ); MariaDB [(none)]> grant select,update,delete,insert on cluster.performance to root@'172.18.0.%' identified by 'jncsy'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> flush privileges;2.授權(quán)某個用戶某張表的某幾列查詢命令
MariaDB [(none)]> grant select(id,server_name) on cluster.performance to root@'172.18.0.%' identified by 'jncsy'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> flush privileges;3.撤銷某用戶的授權(quán)權(quán)限
MariaDB [(none)]> show grants for root@'172.18.0.%'; +--------------------------------------------------------------------------------------------------------------+ | Grants for root@172.18.0.% | +--------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'root'@'172.18.0.%' IDENTIFIED BY PASSWORD '*429B3FB345D35EC8C8B54230AD060C07E846494A' | | GRANT SELECT, INSERT, UPDATE, DELETE ON `cluster`.`performance` TO 'root'@'172.18.0.%' | +--------------------------------------------------------------------------------------------------------------+ 2 rows in set (0.00 sec) MariaDB [(none)]> revoke select on cluster.performance from root@'172.18.0.%'; Query OK, 0 rows affected (0.00 sec)另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。
分享名稱:數(shù)據(jù)庫常用授權(quán)和授權(quán)回收參數(shù)配置-創(chuàng)新互聯(lián)
文章出自:http://jinyejixie.com/article18/ggigp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)建站、搜索引擎優(yōu)化、關(guān)鍵詞優(yōu)化、外貿(mào)建站、品牌網(wǎng)站建設(shè)、網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容