phpmyadmin 3.3.9 配置文件中的更改不允许我访问 phpmyadmin

Posted

技术标签:

【中文标题】phpmyadmin 3.3.9 配置文件中的更改不允许我访问 phpmyadmin【英文标题】:change in phpmyadmin 3.3.9 config file not giving me access to phpmyadmin 【发布时间】:2013-07-13 04:35:18 【问题描述】:

我正在开发一个使用 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_typeconfig 更改为 http,但没有成功。

【问题讨论】:

【参考方案1】:

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

【讨论】:

以上是关于phpmyadmin 3.3.9 配置文件中的更改不允许我访问 phpmyadmin的主要内容,如果未能解决你的问题,请参考以下文章

phpmyadmin取消最大文件限制的更改解决方法

由于配置文件更改,phpmyadmin 无法打开

尝试在 WAMP 上配置 phpmyadmin 文件,无法保存

如何设置 php 配置文件 (php.ini) 在 laradock 的 phpmyadmin 容器中使用

XAMPP 更改端口无法连接到 Windows 中的 phpmyadmin

使用 XAMPP 在 Mac 上更改 phpMyAdmin 中的密码,现在无法访问 localhost/phpmyadmin