PHPMyAdminをIIS 7.0が動作するWindowsマシンにインストールしました。
コマンドラインでのMySQLへの接続は可能ですが、PHPMyAdminでの接続はできません。
エラーは、Error #1045 Cannot log in to the MySQL server.
と表示されます。
誰か助けてくれませんか?
PHP バージョン 5.4.0
mysqlnd 5.0.10 - 20111026 - $Revision: 323634 $
.
phpMyAdmin-3.5.4-rc1-all-languages.7z
です。
EDIT :
以下のリンクを参考にしましたが、成功しませんでした。つまり、そのパスワードを変更しましたが、phpmyadminはまだそのエラーを持っています...。
C.5.4.1.1. ルートパスワードのリセット: Windows システム.
また、スタックに以下のようなスレッドがありますが、何の解決にもなりません。 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();
?>
これらのコードのどの部分を変更すればよいのでしょうか?
ありがとうございます。
あなたが投稿したリンクをたどった後、さらに2つのことをする必要があります。
1つは、変更されたログイン認証情報をphpmyadmin'のconfig.inc.phpにマッピングすることです。
2つ目は、Webとmysqlのサーバーを再起動することです...。
phpのバージョンはここでは問題ではありません。phpmyadminのインストールディレクトリに行き、ファイルconfig.inc.php
を見つけ、そのファイルの中で、現在のmysqlのパスワードを行に置く必要があります。
$cfg['Servers'][$i]['user'] = 'root'; //mysql username here
$cfg['Servers'][$i]['password'] = 'password'; //mysql password here