由于在mysql中设置了密码,通过phpMyAdmin访问时不能输入密码,是通过配置文件的方式加载密码的。所以需要将数据库的密码写到PHP的配置文件中。

这时我们只需要为PHPMYAdmin目录下的config.ini.php中$cfg['Servers'][$i]['controlpass']=""添加您的MySQL密码即可。连接数据库的时候数据库密码不要填即可。

PHP连接MySQL错误 Access denied for user 'root'@'localhost' (using password: YES)

PHP连接MySQL错误 Access denied for user 'root'@'localhost' (using password: YES)

 


 
                    
            
                

相关文章:

  • 2021-07-22
  • 2021-05-23
  • 2021-08-01
  • 2021-06-22
  • 2021-10-10
  • 2021-05-09
  • 2021-08-01
猜你喜欢
  • 2021-04-09
  • 2021-09-08
  • 2021-05-25
  • 2021-07-03
相关资源
相似解决方案