0

我正在使用 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_typeconfigto更改http,但没有运气。

4

1 回答 1

0

好的,我刚刚重新启动了所有 WAMP 服务,然后它运行良好!我想删除这个问题,但后来认为它可能对那些正在撕扯头发但忘记简单重启的人有用。

于 2013-07-15T10:35:34.733 回答