我正在使用一个使用phpmyadmin 3.3.9的遗留系统,而我在config.inc.php文件中所做的就是将$cfg['Servers'][$i]['AllowNoPassword'] = true;
更改为false
。接下来我知道,我收到了这个错误:
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中工作。
我尝试将auth_type
从config
更改为http
,但没有运气。
答案 0 :(得分:0)
好的,我刚刚重新启动了所有WAMP服务,然后运行正常!我想删除这个问题,但后来认为它可能对那些撕裂头发却忘记简单重启的人有用。