[教學]phpMyAdmin多個用戶管理權限。

phpBB Installation & Usage Support
phpBB 2 安裝於各類型作業平台之問題討論;外掛問題,請到相關版面依發問格式發表!
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

版面規則
本區是討論關於 phpBB 2.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
主題已鎖定
hollowaysxp
竹貓忠實會員
竹貓忠實會員
文章: 535
註冊時間: 2004-06-01 22:39
來自: 仙境傳說回憶最美~台灣桃園
聯繫:

[教學]phpMyAdmin多個用戶管理權限。

文章 hollowaysxp »

首先我要感謝各位大大的照顧,讓我能學習到架設論壇的方法與更了解MySQL,在這過程中,我也自己學用Linux架站,到今天還是換回FC2的Linux。

首先必須新增使用者在phpMyAdmin主頁的權限可以找到。

首先打開phpMyAdmin下的config.inc.php
一般來說竹貓星球的教學文件關閉大門的方法即是把登入方式改為http原本是用config依照下面的設定進行。

代碼: 選擇全部

// The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''.
$i++;
$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
                                                    // (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser']   = '';          // MySQL control user settings
                                                    // (this user must have read-only
$cfg['Servers'][$i]['controlpass']   = '';          // access to the "mysql/user"
                                                    // and "mysql/db" tables).
                                                    // The controluser is also
                                                    // used for all relational
                                                    // features (pmadb)
$cfg['Servers'][$i]['auth_type']     = 'http';    // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user']          = 'root';      // MySQL user
$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed
                                                    // with 'config' auth_type)
$cfg['Servers'][$i]['only_db']       = '';          // If set to a db-name, only
                                                    // this db is displayed in left frame
                                                    // It may also be an array of db-names, where sorting order is relevant.
$cfg['Servers'][$i]['verbose']       = '';          // Verbose name for this host - leave blank to show the hostname

$cfg['Servers'][$i]['pmadb']         = '';          // Database used for Relation, Bookmark and PDF Features
                                                    // (see scripts/create_tables.sql)
                                                    //   - leave blank for no support
                                                    //     DEFAULT: 'phpmyadmin'
$cfg['Servers'][$i]['bookmarktable'] = '';          // Bookmark table
                                                    //   - leave blank for no bookmark support
                                                    //     DEFAULT: 'pma_bookmark'
$cfg['Servers'][$i]['relation']      = '';          // table to describe the relation between links (see doc)
                                                    //   - leave blank for no relation-links support
                                                    //     DEFAULT: 'pma_relation'
$cfg['Servers'][$i]['table_info']    = '';          // table to describe the display fields
                                                    //   - leave blank for no display fields support
                                                    //     DEFAULT: 'pma_table_info'
$cfg['Servers'][$i]['table_coords']  = '';          // table to describe the tables position for the PDF schema
                                                    //   - leave blank for no PDF schema support
                                                    //     DEFAULT: 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages']     = '';          // table to describe pages of relationpdf
                                                    //   - leave blank if you don't want to use this
                                                    //     DEFAULT: 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info']   = '';          // table to store column information
                                                    //   - leave blank for no column comments/mime types
                                                    //     DEFAULT: 'pma_column_info'
$cfg['Servers'][$i]['history']       = '';          // table to store SQL history
                                                    //   - leave blank for no SQL query history
                                                    //     DEFAULT: 'pma_history'
$cfg['Servers'][$i]['verbose_check'] = TRUE;        // set to FALSE if you know that your pma_* tables
                                                    // are up to date. This prevents compatibility
                                                    // checks and thereby increases performance.
$cfg['Servers'][$i]['AllowDeny']['order']           // Host authentication order, leave blank to not use
                                     = '';
$cfg['Servers'][$i]['AllowDeny']['rules']           // Host authentication rules, leave blank for defaults
                                     = array();
這邊是關閉大門的方法
下面的之後還看的到。

代碼: 選擇全部

$i++;
$cfg['Servers'][$i]['host']            = 'localhost';
$cfg['Servers'][$i]['port']            = '';
$cfg['Servers'][$i]['socket']          = '';
$cfg['Servers'][$i]['connect_type']    = 'tcp';
$cfg['Servers'][$i]['extension']       = 'mysql';
$cfg['Servers'][$i]['compress']        = FALSE;
$cfg['Servers'][$i]['controluser']     = '';
$cfg['Servers'][$i]['controlpass']     = '';
$cfg['Servers'][$i]['auth_type']       = 'http';
$cfg['Servers'][$i]['user']            = 'user1';
$cfg['Servers'][$i]['password']        = 'pass1';
$cfg['Servers'][$i]['only_db']         = 'user1';
$cfg['Servers'][$i]['verbose']         = '';
$cfg['Servers'][$i]['pmadb']           = ''; // 'phpmyadmin' - see scripts/create_tables.sql
$cfg['Servers'][$i]['bookmarktable']   = ''; // 'pma_bookmark'
$cfg['Servers'][$i]['relation']        = ''; // 'pma_relation'
$cfg['Servers'][$i]['table_info']      = ''; // 'pma_table_info'
$cfg['Servers'][$i]['table_coords']    = ''; // 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages']       = ''; // 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info']     = ''; // 'pma_column_info'
$cfg['Servers'][$i]['history']         = ''; // 'pma_history'
$cfg['Servers'][$i]['verbose_check']   = TRUE;
$cfg['Servers'][$i]['AllowDeny']['order']
                                       = '';
$cfg['Servers'][$i]['AllowDeny']['rules']
                                       = array();

代碼: 選擇全部


$i++;
$cfg['Servers'][$i]['host']            = 'localhost';
$cfg['Servers'][$i]['port']            = '';
$cfg['Servers'][$i]['socket']          = '';
$cfg['Servers'][$i]['connect_type']    = 'tcp';
$cfg['Servers'][$i]['extension']       = 'mysql';
$cfg['Servers'][$i]['compress']        = FALSE;
$cfg['Servers'][$i]['controluser']     = '';
$cfg['Servers'][$i]['controlpass']     = '';
$cfg['Servers'][$i]['auth_type']       = 'http';
$cfg['Servers'][$i]['user']            = 'user2';
$cfg['Servers'][$i]['password']        = 'pass2';
$cfg['Servers'][$i]['only_db']         = 'user1';
$cfg['Servers'][$i]['verbose']         = '';
$cfg['Servers'][$i]['pmadb']           = ''; // 'phpmyadmin' - see scripts/create_tables.sql
$cfg['Servers'][$i]['bookmarktable']   = ''; // 'pma_bookmark'
$cfg['Servers'][$i]['relation']        = ''; // 'pma_relation'
$cfg['Servers'][$i]['table_info']      = ''; // 'pma_table_info'
$cfg['Servers'][$i]['table_coords']    = ''; // 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages']       = ''; // 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info']     = ''; // 'pma_column_info'
$cfg['Servers'][$i]['history']         = ''; // 'pma_history'
$cfg['Servers'][$i]['verbose_check']   = TRUE;
$cfg['Servers'][$i]['AllowDeny']['order']
                                       = '';
$cfg['Servers'][$i]['AllowDeny']['rules']
                                       = array();
基本上開放多個使用者使用mysql時,一個使用者一個帳號,一個資料庫。
所以在新增使用者時權限要給哪些應該知道吧!不要連管理的指令都給他了!

新增完user1與user2之後開始修改config.inc.php
$cfg['Servers'][$i]['host'] = 'localhost';
必須要打上localhost
$cfg['Servers'][$i]['auth_type'] = 'http'; //登入方式http
$cfg['Servers'][$i]['user'] = 'user1'; //使用者帳號
$cfg['Servers'][$i]['password'] = 'pass1'; //使用者密碼\r
$cfg['Servers'][$i]['only_db'] = 'user1'; //她能管的資料庫,此時就給他她該有的資料庫吧!
之後user2同上,之後測試一下是否可以多個使用者可以管理一個資料庫吧!

因為今年升大一,所以暑假都沒有什麼貢獻,在此貢獻一下。
●架設主機作業系統:FreeBSD 6.2-RELEASE (自行架設)
●我的上網方式:FTTB+VDSL HINET 10M/2M
●我安裝的程式:Apache 2.0.59+ PHP Version 4.4.4 + MySql 4.1.21+phpMyadmin 2.9.1.1
●我的 phpBB3 版本:phpBB3.0.1
●我的 phpBB3 連結網址 http://nitcs.itrello.com/forum/
NITCS歡迎你
NITCS論壇
hollowaysxp
竹貓忠實會員
竹貓忠實會員
文章: 535
註冊時間: 2004-06-01 22:39
來自: 仙境傳說回憶最美~台灣桃園
聯繫:

文章 hollowaysxp »

自己頂一下
●架設主機作業系統:FreeBSD 6.2-RELEASE (自行架設)
●我的上網方式:FTTB+VDSL HINET 10M/2M
●我安裝的程式:Apache 2.0.59+ PHP Version 4.4.4 + MySql 4.1.21+phpMyadmin 2.9.1.1
●我的 phpBB3 版本:phpBB3.0.1
●我的 phpBB3 連結網址 http://nitcs.itrello.com/forum/
NITCS歡迎你
NITCS論壇
krab
星球公民
星球公民
文章: 119
註冊時間: 2004-06-28 08:00

文章 krab »

謝謝Hollowaysxp大大的熱心教學。雖然這些東西我用不上,但對於您的熱心卻是由衷欽佩。

我看點閱數有一百六十幾,卻沒有人來回應一下,還要作者自己來頂,不是顯得竹貓太沒人情味了嗎?

嘿嘿嘿,我們不要吝於讚美喔!其實竹貓除了學問之外,有許多東西也是必要的。
阿維
竹貓忠實會員
竹貓忠實會員
文章: 868
註冊時間: 2003-02-23 13:36
來自: 台南市

文章 阿維 »

我倒覺得沒有那麼嚴重,反倒是作者自己頂文有點不太理想\r
那沒有人回覆的話,這是因為這裡有很多大家都知道的東西,所以重複性的文章過多,沒有人回覆是正常的
提供代客維護 phpBB 3.0.x 以及外掛/風格升級或安裝的服務,如需委託,請與我聯絡,謝謝! ;)
我的 Skype 帳號:gpxjordan
hollowaysxp
竹貓忠實會員
竹貓忠實會員
文章: 535
註冊時間: 2004-06-01 22:39
來自: 仙境傳說回憶最美~台灣桃園
聯繫:

文章 hollowaysxp »

是這樣喔!我不知道大家都知道了。
而且我架好我的主機後,有分幾個名額給別人使用。
正確來說是4個名額。一個是我這邊的版主,一個是iOptional的版主,另兩個是給ioptional不認識的人。
●架設主機作業系統:FreeBSD 6.2-RELEASE (自行架設)
●我的上網方式:FTTB+VDSL HINET 10M/2M
●我安裝的程式:Apache 2.0.59+ PHP Version 4.4.4 + MySql 4.1.21+phpMyadmin 2.9.1.1
●我的 phpBB3 版本:phpBB3.0.1
●我的 phpBB3 連結網址 http://nitcs.itrello.com/forum/
NITCS歡迎你
NITCS論壇
阿維
竹貓忠實會員
竹貓忠實會員
文章: 868
註冊時間: 2003-02-23 13:36
來自: 台南市

文章 阿維 »

你生氣啦?
我要說的是假如發表教學都要一人一句感謝的話,把討論串拉得很長\r
回應內容都是一些謝謝分享,然後沒有回應的人都是沒人情味的,這樣對嗎?
總之,我是針對krab他說的,你別放在心上啦
提供代客維護 phpBB 3.0.x 以及外掛/風格升級或安裝的服務,如需委託,請與我聯絡,謝謝! ;)
我的 Skype 帳號:gpxjordan
krab
星球公民
星球公民
文章: 119
註冊時間: 2004-06-28 08:00

文章 krab »

JORDAN 寫: 我要說的是假如發表教學都要一人一句感謝的話,把討論串拉得很長\r
回應內容都是一些謝謝分享,然後沒有回應的人都是沒人情味的,這樣對嗎?
........
各位英雄好漢請莫生氣。小弟我語焉不詳,先跟大家道歉。

Jordan大大講的是對的,隨便一篇教學大家都上來感謝一番,不僅沒營養也浪費資源。我的原意如果讓大家覺得沒回應的就是沒人情味,這就是我的罪過了,請大家原諒。 :cry:


唉呀呀,我怎麼說出不得體的話了呢?有得罪各位的地方請多多海涵,但請相信我絕對沒有惡意就是了。 :mrgreen:
主題已鎖定

回到「phpBB 2 安裝與使用」