網上有很多人說這樣改了SQL密碼後就進入不了phpmyadmin了,不是說密碼錯就是什麼連接配接不了資料庫等。今天我也遇上了這個問題,我的環境是FreeBSD7.0+mysql5.0+ phpMyAdmin 2.10.0
解決辦法很簡單:
1、把/libraries目錄下的config.default.php 覆寫phpmyadmin下的config.inc.php檔案
2、然後修改phpmyadmin/config.inc.php檔案
$cfg['PmaAbsoluteUri'] = 'http://192.168.2.129/phpmyadmin/';
$cfg['Servers'][$i]['host'] = 'localhost';//(通常用預設,也有例外)
$cfg['blowfish_secret'] = ''//裡面修改為任意字元,否則登入會有錯誤提示,具體的忘記了
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password
【網友二】我原來的Mysql密碼為空,phpMyAdmin可以正常使用,然後我在phpMyAdmin裡修Mysql密碼後,phpMyAdmin就不能登陸了,錯誤提示為:
迎使用 phpMyAdmin 2.9.0
Probably reason of this is that you did not create configuration file. You might want to use setup script to create one.
錯誤
MySQL 傳回:
#1045 - Access denied for user: '[email protected]' (Using password: NO)
我在config.default.php把$cfg['Servers'][$i]['password'] = ''; 改成我設定的密碼也一樣進不去 。然後我在指令提示符裡進去Mysql,用剛才設定的密碼是可以進入的,應該是正常進入了吧。
解決方法:把config.default.php改為config.inc.php。
我是第一種二中情況,就是原來沒有設定密碼,改了密碼以後登入不上MySQL,用的第一種方法解決,就是改config.inc.php檔案後重新開機wampserver。