-
2 個附加檔案
phpMyAdmin出現輸入密碼視窗
菜鳥求助欲於瀏覽器中連結phpMyAdmin 2.2.0介面時出現輸入密碼視窗。
環境如下:(localHost)
Winme+Apache1323+MySQL401+phpMyAdmin 2.2.0
於瀏覽器中輸入-http://localhost/phpmyadmin/
是可以正常出現介面,但是就權限管理上欲想有彈出視窗,須先通過此認證方可導出
phpMyAdmin主目錄。
我也屢次更改config.inc.php測試但是都不得其門而入.
$cfgServers[1]['adv_auth'] = FALSE;
$cfgServers[1]['stduser'] = '';
$cfgServers[1]['stdpass'] = '';
$cfgServers[1]['user'] = 'root';
$cfgServers[1]['password'] = '';
stduser與stdpass是否就是最高權限的帳號密碼?而user與password
就是新增的使用者?
我加註密碼值123於下列處
$cfgServers[1]['password'] = '123';
執行瀏覽器瀏覽,卻出現
錯誤
MySQL 傳回:
Access denied for user: '[email protected]' (Using password: YES)
並無彈出視窗.
我揮汗努力且不恥下問中........
附圖為my.ini與原始內容,目的只想要有彈出視窗以供認證,對此我真的是菜鳥
已經搞了一下午囉,就是無認證視窗.請能者指引一條明路.
-
補充說明
補充說明
我有拜讀此文章中[密碼驗證]部分,但是執行上還是失敗
[url]http://www.ysps.tp.edu.tw/about/download/phpmyadmin/phpmyadmin.htm[/url]
1.產生一個.htaccess 的隱藏檔放置於phpMyAdmin資料夾中
2.檔案內加入以下文字
AuthName "private" //取一個名稱
AuthType Basic //基本驗證
AuthUserFile /security/user.pass //驗證用的密碼檔路徑
require user tester1 //指定誰可以使用
3.用htpasswd 製作密碼檔,這要和.htaccess中指定的密碼檔路徑/security/user.pass
此路徑與子資料夾〔/security/user.pass〕是否是放置於phpMyAdmin資料夾中
請能者協助指引,謝謝
-
你是要進入 phpmyadmin 目錄時出現彈出式密碼視窗 ?
那必須要搭配 Apache 的 .htaccess 檔案使用
請參考這裡:
[url]http://www.google.com/search?hl=zh-TW&q=.htaccess&btnG=Google%B7j%B4M&lr=lang_zh-TW[/url]
-
2 個附加檔案
求助
後續求助:confused: :confused:
Apache之htaccess作密碼保護
感謝阿土站長指引,但個人不才,屢試屢敗,故再次請諸位網友指導協助。
測試環境:Winme+Apache1323+MySQL401+phpMyAdmin 2.2.4
可正常以http://localhost/phpmyadmin/與http://localhost/
看到畫面,但欲以瀏覽器進入phpmyadmin,希望能有彈出視窗來驗證。
製作過程:
phpmyadmin內容是於〔htdocs\PHPMyAdmin〕中,故置入.htaccess檔案
於〔htdocs\PHPMyAdmin〕中,且於〔htdocs〕中建立〔pwd〕資料夾以供置放密碼檔案。
.htaccess內容如下
AuthUserFile /pwd/use.pwd //驗證用的密碼檔路徑,請參考htaccess資料夾說明
AuthName "Private" //取一個名稱
AuthType Basic //基本驗證
<Limit GET>
require valid-user
</Limit>
製作密碼檔use.pwd如下:
htpasswd -c use.pwd user1,來產生後,將use.pwd移至〔htdocs/pwd〕中。
隨後瀏覽器中輸入http://localhost/phpmyadmin/,仍無彈出視窗驗證。
Apache之httpd.conf中的設定如下
<Directory "C:/E_Site/Apache/htdocs">
Options FollowSymLinks MultiViews
AllowOverride
Order allow,deny
Allow from all
</Directory>
問題敘述:
於各網站資料中很多都是於Dos視窗中操作,但是我的啟動與關閉Apache都是使用點選
或是Ctrl+C來操作。因此製作密碼檔use.pwd,才會於產生之後用移動的方式移至
〔htdocs/pwd〕中,也想知道如何才能完整於Dos視窗中操作。
除請能者指導上述彈出視窗驗證之外,於〔htdocs/PHPMyAdmin/config.inc.php〕內容如下
$cfgServers[1]['connect_type'] = 'tcp';
$cfgServers[1]['stduser'] = '';
$cfgServers[1]['stdpass'] = '';
$cfgServers[1]['auth_type'] = 'config';
$cfgServers[1]['user'] = 'root';
$cfgServers[1]['password'] = '';
想知道MySQL的最高權限密碼,該如何設定?是在password中,還是鍵入stduser與stdpass。
從PHPMyAdmin中看到使用者如附圖,有關主機%的兩組可否刪除呢?
不恥下問中,請能者指導協助,以利自學進步,謝謝!
-
Re: 求助
[QUOTE][i]最初由 green 發表[/i]
[B]
.htaccess內容如下
AuthUserFile /pwd/use.pwd //驗證用的密碼檔路徑,請參考htaccess資料夾說明
[/B]
[/QUOTE]
要寫絕對路徑
[QUOTE][B]
Apache之httpd.conf中的設定如下
<Directory "C:/E_Site/Apache/htdocs">
Options FollowSymLinks MultiViews
AllowOverride
Order allow,deny
Allow from all
</Directory>
[/B][/QUOTE]
AllowOverride 要就寫 [B]AllowOverride All[/B]
不然就刪掉
<Directory />
....
</Directory>
中的 AllowOverride None
-
$cfgServers[1]['adv_auth'] = FALSE;
改成ture才會跳出密碼詢問~~
-
[QUOTE][i]最初由 lida 發表[/i]
[B]$cfgServers[1]['adv_auth'] = FALSE;
改成ture才會跳出密碼詢問~~ [/B][/QUOTE]
用這個也可以, 那就不用設 .htaccess 及相關的東西了.
但是,必須先在 MySQL 新增一個 user (ex: name:[COLOR=red]abc[/COLOR] password:[COLOR=red]abc123[/COLOR]),
shell> mysql -u root -p mysql
mysql>use mysql;
mysql>INSERT INTO user VALUES('localhost','[COLOR=red]abc[/COLOR]',PASSWORD('[COLOR=red]abc123[/COLOR] '),'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
重新啟動 MySQL ,
這些在[URL=http://www.mysql.com/documentation/index.html]MySQL Reference Manual [/URL] (英文版)中都有說明,想了解更多,就 K 一下吧 !
(台灣這邊好像有人把它翻成中文)
再來修改 phpMyAdmin 的 config.inc.php
$cfgServers[1]['adv_auth'] = true;
$cfgServers[1]['stduser'] = '[COLOR=red]abc[/COLOR]';
$cfgServers[1]['stdpass'] = '[COLOR=red]abc123[/COLOR]';
這樣就可以用了, 一般都是不想用 root 來連結 MySQL 時才用這種方法.
若要用 root 也可以,
只要改 $cfgServers[1]['adv_auth'] = true;
跳出的 密碼視窗 就要打 root 及 當初設的密碼(沒有就空白)
-
感謝與求助
,htaccess的部分藉由阿土站長與joe.oo網友指引是可以正常運作了。
但是phpMyAdmin2.2.4設定彈出視窗中仍有問題.請能者撥冗指引,謝謝
[url]http://www.pczone.com.tw/showthread.php?t=50795[/url]