gpt4 book ai didi

mysql - 错误 # 1045 - 无法登录 MySQL 服务器 -> phpmyadmin

转载 作者:IT老高 更新时间:2023-10-29 00:18:24 26 4
gpt4 key购买 nike

我们已经在运行 IIS 7.0 的 Windows 机器上安装了 PHPMyAdmin。
我们可以使用命令行连接到 MySQL,但是我们无法使用 PHPMyAdmin 连接。
显示的错误是:Error #1045 Cannot log in to the MySQL server.
有人可以帮忙吗?

PHP 版本 5.4.0
mysqlnd 5.0.10 - 20111026 - $修订版:323634 $
phpMyAdmin-3.5.4-rc1-all-languages.7z

编辑:
我点击下面的链接没有成功,这意味着我更改了密码但是 phpmyadmin 仍然有那个错误...
C.5.4.1.1. Resetting the Root Password: Windows Systems

在没有帮助的情况下,堆栈中还有如下所示的线程:
Random error: #1045 Cannot log in to the MySQL server
但那个错误不是随机的 -> 我总是有那个错误......

这是 phpmyadmin 文件夹中的 config.inc.php 文件:

<?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();
?>

我应该更改这些代码的哪些部分?

谢谢。

最佳答案

在 Linux 中,我通过转到根命令提示符类型解决了这个问题:

# mysqladmin -u root password 'Secret Phrase Here'

然后返回并登录。每次都有效!

关于mysql - 错误 # 1045 - 无法登录 MySQL 服务器 -> phpmyadmin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13357561/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com