1\xampp phpmyadmin的配置
1、打開“路徑/phpmyadmin/libraries/config.default.php”,查找相關項並修改為以下內容:
$cfg['PmaAbsoluteUri'] = 'http://218.206.205.35/phpmyadmin/';
$cfg['blowfish_secret'] = 'tbkt'; //[87] 密碼短語
$cfg['Servers'][$i]['host'] = $_COOKIE["mysqlhost"]; //主機地址
$cfg['Servers'][$i]['port'] = $_COOKIE["mysqlport"]; //[115] 端口號
$cfg['Servers'][$i]['auth_type'] = 'cookie'; //[186] 啟用cookie
$cfg['Servers'][$i]['user'] = $_COOKIE["pma_username"]; // 用戶名
$cfg['Servers'][$i]['password'] = $_COOKIE["pma_password"];
$cfg['Servers'][$i]['nopassword'] = true; //[250] 密碼允許為空
$cfg['Servers'][$i]['AllowNoPassword'] = true; //[422] 密碼允許為空
$cfg['LoginCookieValidity'] = 86400; //[676] 登錄超時設置,默認是1440。86400為一天
$cfg['VerboseMultiSubmit'] = true; //[721] 允許多台管理
$cfg['AllowArbitraryServer'] = true; //[721] 允許多台管理
$cfg['ExecTimeLimit'] = 0;
$cfg['LoginCookieRecall'] = false;
$cfg['LoginCookieValidity'] = 60;
2\修改mysql root用戶密碼
安裝xampp后,如果修改mysql root用戶密碼,則phpmyadmin無法登陸,需要更新phpmyadmin的相關配置。
phpmyadmin文件目錄在lampp的安裝目錄下,關鍵的配置文件共有兩個,phpmyadmin/config.inc.php和phpmyadmin/libraries/config.default.php。
其中config.default.php為系統的默認配置,無需修改,但是各種配置的詳細信息、可用選項及各選項值得含義都可從中查找到
修改mysql密碼后,需要更新的文件是config.inc.php文件,確認一下兩項配置:
$cfg['Servers'][$i]['auth_type'] = 'config'; // 從配置文件中獲取密碼,還可以配成cookie、http等見default文件可知含義。
$cfg['Servers'][$i]['password'] = 'XXXXX'; // 你新配置的密碼
2.使用SQL語句修改root用戶的密碼 update user set password = PASSWORD('root') where user = 'root' ;