0

XAMPPからphpMyAdminを実行しようとすると、このエラーが発生します。XAMPPをインストールして実行する前に、このマシンに既存のmysqlがインストールされていました。XAMPPを起動すると、mysqlとapache2の両方が正常に起動します。PHPスクリプトを使用してmysqlデータベースにアクセスできますが、phpmyadminを介してアクセスすることはできません。

Error

MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
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.
4

2 に答える 2

1

パスワードなしで root として mysql にアクセスする場合は、/xampp/phpMyAdmin/config.inc.phpファイルで次の変数が設定されていることを確認します。

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
于 2010-10-04T19:58:08.977 に答える
0

root ユーザーにパスワードを設定していますか? root経由で接続するべきではありませんが、それを確認してください。また、あるバージョンの phpmyadmin で root ユーザーでのログインが許可されなかったという問題があったことも思い出しました。

于 2010-10-04T19:43:46.563 に答える