2016-07-13 15 views
-1

私はアンドロイド登録ページの開発にWAMPサーバーを使用しています。このエラーが発生しました:ユーザー 'root' @ 'localhost'のアクセスが拒否されました(パスワード:YESを使用)

Access denied for user 'root'@'localhost' (using password: YES)

この問題を解決する際にお手伝いをしてください。ここで

は私のconfig.inc.phpファイルです:

<?php 
/* vim: set expandtab sw=4 ts=4 sts=4: */ 
/** 
* phpMyAdmin sample configuration, you can use it as base for 
* manual configuration. For easier setup you can use setup/ 
* 
* All directives are explained in documentation in the doc/ folder 
* or at <http://docs.phpmyadmin.net/>. 
* 
* @package PhpMyAdmin 
*/ 

/* 
* This is needed for cookie based authentication to encrypt password in 
* cookie 
*/ 
$cfg['blowfish_secret'] = 'a8b7c6d'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ 

/* 
* Servers configuration 
*/ 
$i = 0; 

/* 
* First server 
*/ 
$i++; 
/* Authentication type */ 
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver'; 
//$cfg['Servers'][$i]['auth_type'] = 'cookie'; 
$cfg['Servers'][$i]['auth_type'] = 'config'; 
$cfg['Servers'][$i]['user'] = 'root'; 
$cfg['Servers'][$i]['password'] = ''; 
/* Server parameters */ 
$cfg['Servers'][$i]['host'] = '127.0.0.1'; 
$cfg['Servers'][$i]['connect_type'] = 'tcp'; 
$cfg['Servers'][$i]['compress'] = false; 
/* Select mysql if your server does not have mysqli */ 
$cfg['Servers'][$i]['extension'] = 'mysqli'; 
$cfg['Servers'][$i]['AllowNoPassword'] = true; 



/* 
* phpMyAdmin configuration storage settings. 
*/ 

// No warning on pmadb tables 
$cfg['PmaNoRelation_DisableWarning'] = true; 


?> 

ここconfig.phpファイルされる:

<?php 

/** 
* Database config variables 
*/ 
define("DB_HOST", "localhost"); 
define("DB_USER", "root"); 
define("DB_PASSWORD", "root"); 
define("DB_DATABASE", "android_api"); 
?> 

ここでは私の正確な問題です: enter image description here

+0

GOボタンを押し、空

password:フィールドを残します。 configで空の文字列として指定しましたが、明らかにサーバーはrootアカウントに「パスワードなし」を持っていません。 –

+3

権限を付与しようとしているときに、[ユーザー 'root' @ 'localhost'のアクセスが拒否されました。どうすれば特権を与えることができますか?](http://stackoverflow.com/questions/8484722/access-denied-for-user-rootlocalhost-while-attempting-to-grant-privileges) – olibiaz

+0

@MarcBフィールド私もPHPのadminページを開くことができますページ全体がこのエラーを取得している場合 –

答えて

1

あなたの場合を除きrootのユーザーIDにパスワードを追加しておいてください。デフォルトでは、パスワードなしでそのまま使用できます。

はそうちょうど

を入れ
define("DB_USER", "root"); 
define("DB_PASSWORD", ""); 

それとも、GOボタンをphpMyAdminを空白のパスワードフィールドを離れるとヒット

RE:私はその後

画面をphpMyAdminの

を使用しています:コメントこのようにする必要があります

enter image description here

ユーザー名でrootを入力して、あなたが間違ったパスワードを使用

+0

もし私が私もPHPの管理ページを開くことができます –

+0

エラーが来ている全ページが私の場合 –

+0

Thanks @ chris85 – RiggsFolly

関連する問題