7

Xampp(Windows用)をインストールしました。私はそのすべての機能で喜んでそれを使用していました.

次に、MySql パスワードを変更したいと思いました。ランダムに生成されたパスワード (rCZ4Xnz78zbLY2Vh) を設定します。その後、PHPMyAdmin はログインを停止しました。次のエラー メッセージが表示されるようになりましたが、それ以降は同じです。

Error

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.

次に、PHPMyAdmin の「config.inc.php」ファイルを編集し、その内容を正確に以下のようにしました。

<?php

/* Servers configuration */
$i = 1;
$cfg['Servers'][$i]['host']         = '127.0.0.1';
$cfg['Servers'][$i]['port']         = '3306';
$cfg['Servers'][$i]['ssl']          = FALSE;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension']    = 'mysql';
$cfg['Servers'][$i]['compress']     = FALSE;
$cfg['Servers'][$i]['controluser']  = 'root';   
$cfg['Servers'][$i]['controlpass']  = 'rCZ4Xnz78zbLY2Vh';
$cfg['Servers'][$i]['auth_type']    = 'config';
$cfg['Servers'][$i]['user']         = 'root';
$cfg['Servers'][$i]['password']     = 'rCZ4Xnz78zbLY2Vh';
$cfg['Servers'][$i]['nopassword']   = TRUE;

/* 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';

/* Other settings */
$cfg['blowfish_secret'] = '';
$cfg['DefaultCharset']  = 'utf-8';
$cfg['UploadDir']       = '';
$cfg['SaveDir']         = '';

?>

しかし、コマンドラインから同じパスワードでMySqlサーバーに接続できました。

C:\Users\hkBattousai>mysql.exe --user=root --password=rCZ4Xnz78zbLY2Vh
mysql.exe: Unknown OS character set 'cp857'.
mysql.exe: Switching to the default character set 'latin1'.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.5.27 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

次に、コマンド ライン インターフェイスからパスワードを削除しました。

ユーザーパスワードが削除されました

config.inc.phpファイルからパスワードも削除しました。そのファイルの関連する行は次のとおりです。

$cfg['Servers'][$i]['controluser']  = 'root';
$cfg['Servers'][$i]['controlpass']  = '';
$cfg['Servers'][$i]['user']         = 'root';
$cfg['Servers'][$i]['password']     = '';

現在、奇妙なことに、削除したパスワードで接続できますが、空のパスワードでは接続できません。

C:\Users\hkBattousai>mysql.exe --user=root --password=rCZ4Xnz78zbLY2Vh  // Connects
C:\Users\hkBattousai>mysql.exe --user=root --password=                  // Error given

このユーザーに別のランダムなパスワードを割り当て、以前に Xampp を新しくインストールしたときと同じように、PHPMyAdmin を介してデータベースにアクセスしたいと考えています。私は何をすべきか?私は本当に混乱していて、あなたの助けが必要です。

config.inc.phpファイルの内容が無視されるようなものです。テンプレート ファイルからコピーし、config.sample.inc.phpその内容を変更しました。現在、ディレクトリにあり\Xampp\phpmyadmin\ます。


バージョン:

Xampp   : 3.1.0
MySQL   : 5.5.27
PHP     : 5.4.7
Apache  : 2.4
Windows : 7 Ultimate x64 SP1
4

4 に答える 4

34

phpMyAdmin ディレクトリ (おそらく C:\xampp\phpMyAdmin) の config.inc ファイルを編集し、phpMyAdmin で root に入力したパスワードと一致するようにこの行を変更する必要があります。

$cfg['サーバー'][$i]['パスワード'] = ' ';

于 2013-09-11T05:26:07.080 に答える
0

実際のパスワードを指定する必要があります。設定ファイルの暗号化されていないパスワード

于 2012-10-22T13:07:57.663 に答える