2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

mysqlパスワード変更時のphpmyadminへパスワード反映

Last updated at Posted at 2019-06-29

事象

mysqlのrootパスワード変えたらphpmyadminにアクセスできなくなりました。
(当然なんですが。。。)

エラーメッセージ

MySQL のメッセージ: 
接続できません。設定が無効です。  

 mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO)  

 MySQL サーバに接続しようとしましたが拒否されました。config.inc.php のホスト、ユーザ名、パスワードが MySQL サーバの管理者から与えられた情報と一致するか確認してください。

対処法

記載あるようにconfig.inc.phpに変更したパスワードを記載します。

phpmyadmin/config.inc.php
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'NewPassword'; // ここに新しいパスワードを記載
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?