【问题标题】:phpMyAdmin wrong parametersphpMyAdmin 参数错误
【发布时间】:2018-10-29 11:15:32
【问题描述】:

我无法使用 xampp 运行 phpmyadmin:

MySQL diu:

没有 es pot 连接器:参数不正确。

mysqli_real_connect(): (HY000/2002): No se puede establecer una conxi�n ya que elequipo de destino deneg� expresamente dicha 锥体。

La connexió de l'usuari de control ha fallat, tal com està definida ara a la configuració。

mysqli_real_connect(): (HY000/2002): No se puede establecer una conxi�n ya que elequipo de destino deneg� expresamente dicha 锥体。

phpMyAdmin 有意图连接 amb el servidor MySQL,però el servidor ha rebutjat la connexió。 Comproveu l'amfitrió, el nom d'usuari i la contrasenya al vostre fitxer config.inc.php i assegureu-vos que correspon amb la informació facilitada per l'administrador del servidor MySQL。

我尝试编辑文件 config.inc.php,但看不到我应该更改什么。

在谷歌的其他地方也没有看到这个问题,所以希望这不是重复的。

欢迎任何想法,

提前谢谢你。

PD:我的 config.inc.php 文件主要内容:

$cfg['Servers'][$i]['verbose'] = 'localhost';
$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'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['port'] = '3306';

/* 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';

【问题讨论】:

  • 请不要以图片形式发布错误信息。以文本形式发布。
  • 可能是您的密码错误。但我们永远无法确定:p
  • 尝试使用$cfg['Servers'][$i]['host'] = '127.0.0.1' 而不是$cfg['Servers'][$i]['host'] = 'localhost' 并删除$cfg['Servers'][$i]['port'] = '3306'。同样默认情况下,root 在 xammp 中没有密码,所以它可能不是密码。
  • @EugeneAnisiutkin '$cfg['Servers'][$i]['host'] = 'localhost'' 是我在另一篇文章中尝试的,但没有成功。照你说的做还是一样。
  • 错误消息确实表明用户名或密码错误,据我的翻译告诉我,所以我猜$cfg['Servers'][$i]['user'] = 'root' 是错误的或$cfg['Servers'][$i]['password'] = '' 是错误的。请注意,最后一个是空字符串。当您在配置中设置错误的密码时,该错误很容易复制。或者更好的解决方案 - 检查您的 SQL 服务器是否正在运行。当它不运行时你会收到该消息)

标签: php mysql phpmyadmin xampp


【解决方案1】:

我终于找到了解决办法。我所要做的就是遵循本教程:

set pswd to mysql.user

还用新设置的 pswd 更改了我的 config.inc.php。

有关此问题的更多问题:

/* Authentication type and info */
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'new_password'; //new password
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['port'] = '3306';

感谢所有尝试帮助我的人。

【讨论】:

  • 恭喜您找到解决方案。甚至没有想过那个。我很久以前遇到过类似的事情。
猜你喜欢
  • 1970-01-01
  • 2015-06-25
  • 2018-12-16
  • 2014-03-30
  • 2011-07-04
  • 2012-05-21
  • 1970-01-01
  • 2015-11-13
  • 2016-02-23
相关资源
最近更新 更多