2015-03-13 77 views
3

嗨,我知道它的一個老問題,但我嘗試了很多答案和指南,但都是徒勞的。我使用phpMyAdmin沒有我的本地機器上的密碼之前,我使用的命令提示符窗口上有改變密碼以下命令XAMPP phpMyadmin:更改密碼後訪問被拒絕

mysqladmin.exe -u root密碼根

從那時起,我不能打開我的本地主機/ phpMyAdmin的,我得到以下錯誤

1045 - 訪問被拒絕的用戶 '根' @ 'localhost' 的(使用密碼:NO)

我試圖改變該文件的當前的config.inc.php狀態爲如下

$cfg['Servers'][$i]['auth_type'] = 'config'; 
$cfg['Servers'][$i]['user'] = 'root'; 
$cfg['Servers'][$i]['password'] = ''; 
$cfg['Servers'][$i]['extension'] = 'mysqli'; 
$cfg['Servers'][$i]['AllowNoPassword'] = true; 
$cfg['Lang'] = ''; 

/* Bind to the localhost ipv4 address and tcp */ 
$cfg['Servers'][$i]['host'] = 'localhost'; 
$cfg['Servers'][$i]['connect_type'] = 'tcp'; 

/* User for advanced features */ 
$cfg['Servers'][$i]['controluser'] = 'pma'; 
$cfg['Servers'][$i]['controlpass'] = ''; 

我試圖改變從本地主機/ security.php和改變密碼的密碼。我也嘗試通過打開resetroot.bat批處理文件來重置根密碼。我認真地認爲我已經搞砸了,所以如果有人能幫助我,我會感激不盡。 我使用XAMPP在Windows 7上

編輯此外,我想告訴你,我曾經試圖

$cfg['Servers'][$i]['password'] = ''; 

而且還提供了新的密碼

$cfg['Servers'][$i]['controluser'] = 'pma'; 
$cfg['Servers'][$i]['controlpass'] = ''; 

改變用戶以root身份登錄

回答

0

您正在使用命令提示符將root密碼定義爲'root',s o,在配置你必須使用dame:

$ cfg ['Servers'] [$ i] ['password'] ='root';

+0

對不起,請參閱我的編輯 – 2015-03-13 06:34:28

0

有一個名爲resetroot.bat的批處理文件位於xammp文件夾的'C:\ xampp \ mysql'中運行它,它將刪除phpadmin密碼。然後,您只需在xammp中啓動MySQL服務並單擊管理按鈕即可。

來源:How to get back Lost phpMyAdmin Password, XAMPP

+0

試過了。沒有工作 – 2015-03-13 06:51:15

+0

您是否在更改後重新啓動「mysql」服務? – 2015-03-13 06:54:29

+0

嘗試更改$ cfg ['Servers'] [$ i] ['controluser'] ='pma';到$ cfg ['Servers'] [$ i] ['controluser'] ='root'; – Antony 2015-03-13 06:56:57

0

你必須在配置 更改密碼如果您忘記在重置密碼.bat文件在MySQL文件夾中找到的XAMPP根文件夾密碼,請點擊

$cfg['server'][$i]['password'] = 'PassWordHere' 

此外還原更改到PMA配置,因爲這可能會導致事制動

2

打開XAMPP/phpMyAdmin的/ config.inc和更改行

然後至210
$cfg['Servers'][$i]['auth_type'] = 'config'; 

$cfg['Servers'][$i]['auth_type'] = 'cookie'; 

phpMyAdmin的會顯示登錄屏幕,您可以輸入您的用戶名和密碼。

相關問題