Error # 1045 - Cannot Log in to MySQL server -gt; phpmyadmin(错误 #1045 - 无法登录 MySQL 服务器 -phpmyadmin)
问题描述
我们已经在运行 IIS 7.0 的 Windows 机器上安装了 PHPMyAdmin.
我们可以使用命令行连接到 MySQL,但是我们无法使用 PHPMyAdmin 连接.
显示的错误是:Error #1045 Cannot log in the MySQL server.
有人可以帮忙吗?
We have installed PHPMyAdmin on a windows machine running IIS 7.0.
We are able to connect to MySQL using command-line, But we are not able to connect using PHPMyAdmin.
The error displayed is: Error #1045 Cannot log in to the MySQL server.
Can somebody please help?
PHP 5.4.0 版mysqlnd 5.0.10 - 20111026 - $Revision: 323634 $phpMyAdmin-3.5.4-rc1-all-languages.7z
我按照下面的链接没有成功,这意味着我更改了密码,但 phpmyadmin 仍然有该错误...
C.5.4.1.1.重置根密码:Windows 系统
在没有帮助的情况下,堆栈中还有如下线程:
随机错误:#1045 无法登录 MySQL 服务器
但那个错误不是随机的 -> 我总是有那个错误......
Also there is thread like below in stack with no help :
Random error: #1045 Cannot log in to the MySQL server
but that error is not random -> i always have that error...
这是phpmyadmin文件夹中的config.inc.php文件:
And this is config.inc.php file in phpmyadmin folder:
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Config file view and save screen
*
* @package PhpMyAdmin-setup
*/
if (!defined('PHPMYADMIN')) {
exit;
}
/**
* Core libraries.
*/
require_once './libraries/config/FormDisplay.class.php';
require_once './setup/lib/index.lib.php';
require_once './setup/lib/ConfigGenerator.class.php';
$config_readable = false;
$config_writable = false;
$config_exists = false;
check_config_rw($config_readable, $config_writable, $config_exists);
?>
<h2><?php echo __('Configuration file') ?></h2>
<?php display_form_top('config.php'); ?>
<input type="hidden" name="eol" value="<?php echo htmlspecialchars(PMA_ifSetOr($_GET['eol'], 'unix')) ?>" />
<?php display_fieldset_top('', '', null, array('class' => 'simple')); ?>
<tr>
<td>
<textarea cols="50" rows="20" name="textconfig" id="textconfig" spellcheck="false"><?php
echo htmlspecialchars(ConfigGenerator::getConfigFile())
?></textarea>
</td>
</tr>
<tr>
<td class="lastrow" style="text-align: left">
<input type="submit" name="submit_download" value="<?php echo __('Download') ?>" class="green" />
<input type="submit" name="submit_save" value="<?php echo __('Save') ?>"<?php if (!$config_writable) echo ' disabled="disabled"' ?> />
</td>
</tr>
<?php
display_fieldset_bottom_simple();
display_form_bottom();
?>
我应该更改这些代码的哪些部分?
where part of these codes should i change?
谢谢.
推荐答案
点击帖子中提到的链接后,您还需要做两件事:
You need to do two additional things after following the link that you have mentioned in your post:
必须在 phpmyadmin 的 config.inc.php
One have to map the changed login cridentials in phpmyadmin's config.inc.php
其次,你需要重启你的 web 和 mysql 服务器..
and second, you need to restart your web and mysql servers..
php 版本不是这里的问题..你需要去 phpmyadmin 安装目录并找到文件 config.inc.php 并在该文件中放入你当前的 mysql密码在行
php version is not the issue here..you need to go to phpmyadmin installation directory and find file config.inc.php and in that file put your current mysql password at line
$cfg['Servers'][$i]['user'] = 'root'; //mysql username here
$cfg['Servers'][$i]['password'] = 'password'; //mysql password here
这篇关于错误 #1045 - 无法登录 MySQL 服务器 ->phpmyadmin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:错误 #1045 - 无法登录 MySQL 服务器 ->phpmyadmin
基础教程推荐
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 带更新的 sqlite CTE 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
