2013-07-15 155 views
0

我正在使用phpmyadmin 3.3.9的遺留系統,而我對config.inc.php文件做的所有操作都是將$cfg['Servers'][$i]['AllowNoPassword'] = true;更改爲false 。接下來的事情我知道,我得到這個錯誤:phpmyadmin改變3.3.9配置文件沒有給我訪問phpmyadmin

MySQL said: 
Cannot connect: invalid settings. 
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server. 

然後我試圖恢復,但不管我做什麼,它不連接。我用一個鏡像系統的配置文件替換了配置文件,但沒有運氣!這是配置文件的內容,出了什麼問題?

<?php 

/* Servers configuration */ 
$i = 0; 

/* Server: localhost [1] */ 
$i++; 
$cfg['Servers'][$i]['verbose'] = 'localhost'; 
$cfg['Servers'][$i]['host'] = 'localhost'; 
$cfg['Servers'][$i]['port'] = ''; 
$cfg['Servers'][$i]['socket'] = ''; 
$cfg['Servers'][$i]['connect_type'] = 'tcp'; 
$cfg['Servers'][$i]['extension'] = 'mysqli'; 
$cfg['Servers'][$i]['auth_type'] = 'config'; 
$cfg['Servers'][$i]['user'] = 'root'; 
$cfg['Servers'][$i]['password'] = ''; 
$cfg['Servers'][$i]['AllowNoPassword'] = true; 

/* End of servers configuration */ 

$cfg['DefaultLang'] = 'en-utf-8'; 
$cfg['ServerDefault'] = 1; 
$cfg['UploadDir'] = ''; 
$cfg['SaveDir'] = ''; 


/* rajk - for blobstreaming */ 
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50; 
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M'; 
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600; 
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M'; 


?> 

該應用程序能夠訪問mysql罰款,問題是在訪問phpmyadmin的Web界面。

我幾乎覺得這是類似於如何在Windows和UNIX編輯的文件可能只在換行符的差異,因爲問題的錯誤,因爲我所做的就是換一個詞,並保存它。但我完全在Windows中工作。

我試着從config改爲auth_typehttp,但是沒有運氣。

回答

0

好吧,我剛剛重啓,所有WAMP的服務,然後將它運行得很好!我想刪除這個問題,但後來認爲它可能對那些撕開頭髮但忘記重新啓動的人有用。