文章目錄
phpMyAdmin-3.5.2.2-all-languages.zip的安裝配置
1.下載phpMyAdmin-3.5.2.2-all-languages.zip檔案,點擊下載
2.配置預設伺服器訪問。
a.解壓檔案到網站目錄。
b.
c.然後進入
開啟config.default.php檔案。
d.尋找 $cfg['PmaAbsoluteUri']
修改為你將上傳到空間的phpMyAdmin的網址
如:$cfg['PmaAbsoluteUri'] = 'http://www.piaoyi.org/phpmyadmin/';
這裡因為我是本地調試,我改為$cfg['PmaAbsoluteUri'] = 'http://localhost/phpmyadmin/';
注意:不要漏掉最後的反斜線/和開頭的http。
e.尋找 $cfg['Servers'][$i]['host'] = 'localhost';(通常用預設,也有例外,可以不用修改)
f.尋找 $cfg['Servers'][$i]['auth_type'] = 'config';
在自己的機子裡調試用config;如果在網路上的空間用cookie,這裡我們既然在前面已經添加了網址,就修改成cookie。
我個人建議:無論是本地還是網路上,都建議設定成cookie,安全第一。
同時,當auth_type這個值設定為cookie後,還有一個地方需要作出相應的修改:
$cfg['blowfish_secret'] = '';
改成:$cfg['blowfish_secret'] = 'www.piaoyi.org';
這裡的www.piaoyi.org自己隨便定義,不超過46個字元。如果這個地方留空,將會出現上文提到的第2個錯誤:“設定檔現在需要絕密的短語密碼(blowfish_secret)”。
g.尋找 $cfg['Servers'][$i]['user'] = 'root'; // MySQL user(使用者名稱,自己機裡用root;在網上一般為你的ftp使用者名稱,虛擬機器主機供應商會告訴你的;一般不要修改)
h.尋找 $cfg['Servers'][$i]['password'] = '123456'; // MySQL password (123456修改成串連你的MYSQL資料庫的使用者密碼)
j.尋找 $cfg['DefaultLang'] = 'zh_CN'; (這裡是選擇語言,zh_CN代表簡體中文的意思)
h.尋找$cfg['Servers'][$i]['AllowNoPassword'] = true; (這裡的作用為你是否允許密碼為空白登入)
i.此時你可以開啟網址訪問了!
3.配置多伺服器訪問
a.在phpmyadmin目錄建立config檔案夾。拷貝config.sample.inc.php到config檔案中,改名為config.inc.php
b.開啟網址:http://www.xxxxxx.com/phpMyAdmin-3.5.2.2-all-languages/setup/index.php
c.載入配置: 點擊載入按鈕!
此時伺服器列表中會顯示相應的資訊!
d.點擊編輯按鈕可以對伺服器進行配置,注意一定要儲存才行!
e.如果配置完畢了,拷貝config/config.inc.php檔案至phpmyadmin根目錄,然後刪除config檔案夾。
f.配置好了,讓我們看一下效果:
4.當然我們還可以直接使用代碼修改phpmyadmin根目錄下的config.inc.php(如不存在則拷貝config.simple.inc.php更名為config.inc.php)形式如下:
<?php/* * Generated configuration file * Generated by: phpMyAdmin 3.5.2.2 setup script * Date: Thu, 30 Aug 2012 07:53:35 +0000 *//* Servers configuration */$i = 0;/* Server: localhost [1] */$i++;$cfg['Servers'][$i]['auth_type'] = 'cookie';$cfg['Servers'][$i]['host'] = 'localhost';$cfg['Servers'][$i]['connect_type'] = 'tcp';$cfg['Servers'][$i]['compress'] = false;$cfg['Servers'][$i]['extension'] = 'mysqli';$cfg['Servers'][$i]['AllowNoPassword'] = false;/* Server: 192.168.2.109 [2] */$i++;$cfg['Servers'][$i]['auth_type'] = 'cookie';$cfg['Servers'][$i]['host'] = '192.168.2.109';$cfg['Servers'][$i]['connect_type'] = 'tcp';$cfg['Servers'][$i]['compress'] = false;$cfg['Servers'][$i]['extension'] = 'mysqli';$cfg['Servers'][$i]['AllowNoPassword'] = false;/* End of servers configuration */$cfg['blowfish_secret'] = 'a8b7c6d';$cfg['UploadDir'] = '';$cfg['SaveDir'] = '';$cfg['DefaultLang'] = 'zh_CN';$cfg['ServerDefault'] = 2;?>