この問題が以前にも発生したことは知っていますが、どの解決策も私には効果がありませんでした。
どなたか、私に何をすべきかを段階的に教えていただければ幸いです。
Windows 10 64 ビットで XAMPP を使用しています。phpmyadmin を使用すると、このエラー メッセージが表示されます。
mysqli_real_connect(): (HY000/1045): ユーザー 'pma'@'localhost' のアクセスが拒否されました (パスワード使用: NO)
config.inc.php
/*
* First server
*/
$i++;
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
/*
* End of servers configuration
*/
?>
答え1
MySQL でユーザー「pma」を作成するか、C:\xampp\phpMyAdmin\config.inc.php
MySQL のユーザー名とパスワードの次の行を変更します。
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'your_password';
答え2
これらすべてを行っても、私の問題は解決できませんでした。この問題を解決するために私が行ったことは、controluser!
ユーザーを維持する代わりに、name'= 'pma'
次のようにクリアすることでした。
$cfg['Servers'] [$i]['controluser'] = ' ';
ユーザー名が空になる場所。
これでエラーは解決するはずです。
答え3
すべてのデータベースとテーブルで「pma」ユーザーに権限を追加する方法を理解したくなかったので、root
代わりに使用するように変更しました。
$cfg['Servers'][$i]['controluser'] = 'root';