修改phpmyadmin密码之后,会影响到mysql的密码吗

2025-02-23 07:28:45
推荐回答(1个)
回答1:

  我的环境是FreeBSD7.0+mysql5.0+ phpMyAdmin 2.10.0
  解决办法很简单:
  1、把/libraries目录下的config.default.php 覆盖phpmyadmin下的config.inc.php文件
  2、然后修改phpmyadmin/config.inc.php文件
  $cfg['PmaAbsoluteUri'] = '';
  $cfg['Servers'][$i]['host'] = 'localhost';//(通常用默认,也有例外)
  $cfg['blowfish_secret'] = ''//里面修改为任意字符,否则登录会有错误提示,具体的忘记了
  $cfg['Servers'][$i]['auth_type'] = 'cookie';
  $cfg['Servers'][$i]['user'] = 'root'; // MySQL user
  $cfg['Servers'][$i]['password'] = ''; // MySQL password
  【网友二】我原来的Mysql密码为空,phpMyAdmin可以正常使用,然后我在phpMyAdmin里修Mysql密码后,phpMyAdmin就不能登陆了,错误提示为:
  迎使用 phpMyAdmin 2.9.0
  Probably reason of this is that you did not create configuration file. You might want to use setup script to create one.
  错误
  MySQL 返回:
  #1045 - Access denied for user: 'root@localhost' (Using password: NO)
  我在config.default.php把$cfg['Servers'][$i]['password'] = ''; 改成我设定的密码也一样进不去 。然后我在命令提示符里进去Mysql,用刚才设定的密码是可以进入的,应该是正常进入了吧 。
  解决方法:把config.default.php改为config.inc.php。