phpMyAdmin中config.inc.php設置密碼和修改密碼的方法


phpMyAdmin有3種授權模式:
1. cookie: 顯示一個web登錄頁面,輸入mysql的用戶名和密碼,然后進入管理界面。
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
   
2. http: 顯示1個windows登錄框,輸入mysql的用戶名和密碼,然和進入管理.
$cfg['Servers'][$i]['auth_type'] = 'http';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;


3. config: 把mysql用戶名和密碼直接填入config.inc.php,不顯示登錄界面,直接進入管理界面 。
    config模式需要這幾個參數,如下:
    $cfg['Servers'][$i]['auth_type'] = 'config'; 
     $cfg['Servers'][$i]['user'] = 'root';         
     $cfg['Servers'][$i]['password'] = 'root';
   
phpMyAdmin的配置文件名為config.inc.php,各版本的config.inc.php修改方法如下: 2.6以前版本:將config.inc.sample.php改為 config.inc.php 2.7版本:將config.default.php改為config.inc.php 2.8版本:用配置腳本 ‘/script/setup.php’生成配置文件,生成的文件拷貝下來,手動存為config.inc.php


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM