2016-02-08 113 views
0

我已經試過張貼在folloing鏈接的解決方案,它並沒有幫助我的phpmyadmin開始: phpMyAdmin - can't connect - invalid setings - ever since I added a root password - locked out不能使用本地主機的XAMPP

唯一不同的是我從來沒有設置密碼。這發生在最初嘗試啓動phpmyadmin時。這裏是我的config.inc.php文件看起來像:

/* Authentication type */ 
$cfg['Servers'][$i]['auth_type'] = 'http'; 
$cfg['Servers'][$i]['user'] = 'root'; 
$cfg['Servers'][$i]['password'] = ''; 
/* Server parameters */ 
//$cfg['Servers'][$i]['host'] = 'localhost'; 
//$cfg['Servers'][$i]['connect_type'] = 'tcp'; 
$cfg['Servers'][$i]['compress'] = false; 
$cfg['Servers'][$i]['AllowNoPassword'] = false; 

/** 
* phpMyAdmin configuration storage settings. 
*/ 

/* User used to manipulate with storage */ 
// $cfg['Servers'][$i]['controlhost'] = ''; 
// $cfg['Servers'][$i]['controlport'] = ''; 
$cfg['Servers'][$i]['controluser'] = 'pma'; 
$cfg['Servers'][$i]['controlpass'] = ''; 

/* Storage database and tables */ 
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; 
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; 
$cfg['Servers'][$i]['relation'] = 'pma__relation'; 
$cfg['Servers'][$i]['table_info'] = 'pma__table_info'; 
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; 
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; 
$cfg['Servers'][$i]['column_info'] = 'pma__column_info'; 
$cfg['Servers'][$i]['history'] = 'pma__history'; 
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; 
$cfg['Servers'][$i]['tracking'] = 'pma__tracking'; 
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; 
$cfg['Servers'][$i]['recent'] = 'pma__recent'; 
$cfg['Servers'][$i]['users'] = 'pma__users'; 
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; 
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; 
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; 
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; 
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords'; 
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; 
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; 
$cfg['Servers'][$i]['favorite'] = 'pma__favorite'; 
// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; 
// $cfg['Servers'][$i]['users'] = 'pma__users'; 
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; 
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; 
// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; 
// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; 
// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; 
// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; 
/* Contrib/Swekey authentication */ 
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf'; 

/** 
* End of servers configuration 
*/ 

最後,我也保證我attampting通過運行以下命令來運行的phpmyadmin之前啓動MySQL:

mysql -u root -p 

請幫幫忙!

+1

'不能啓動phpmyadmin'是什麼意思?你有404或500的錯誤嗎? – mazedlx

回答

1

如果你的root賬號沒有密碼,默認情況下它不會再改變從

$cfg['Servers'][$i]['AllowNoPassword'] = false; 

這個參數去

$cfg['Servers'][$i]['AllowNoPassword'] = true; 

這將允許賬戶沒有密碼使用

但是,如果這是基本配置,我會希望XAMPP的安裝在root上設置密碼。所以,你可能需要閱讀安裝說明檢查密碼,他們爲root用戶帳戶

其他建議

當然,這也可能是因爲你有一個以上的MySQL服務器上運行設置你的系統和你實際做的是連接到之前的那個,因爲它可能是AutoStarted,因此在啓動XAMPP之前抓取端口3306。

在遇到XAMPP之前是否安裝了另一個MYSQL?

如果是這樣,請查看services管理單元,並查看列表中是否有多個MYSQL服務器服務。我不記得XAMPP是否爲MYSQL提供了除MYSQL之外的特定名稱,現在我已經是WAMPServer用戶,自從使用XAMPP以來,這已經有幾年了。

如果您還記得其他MYSQL服務器上的密碼是root,那就試試這個,以證明是這種情況。

+0

我試過兩個版本,它仍然要求輸入用戶名和密碼。我爲用戶名輸入'root',並將'AllowNoPassword'方法的密碼留空,但它仍然不起作用。同樣,我嘗試輸入我的Ubuntu root密碼作爲用戶名的'root'作爲另一個版本,這也不起作用。 – DeeTee

+0

它與您的Ubuntu root帳戶無關。 – RiggsFolly

相關問題