【问题标题】:Cant start phpmyadmin using xampp localhost无法使用 xampp localhost 启动 phpmyadmin
【发布时间】:2016-02-08 01:04:06
【问题描述】:

我尝试了以下链接中发布的解决方案,但对我没有帮助: phpMyAdmin - can't connect - invalid setings - ever since I added a root password - locked out

唯一的区别是我从不设置密码。这发生在最初尝试启动 phpmyadmin 时。这是我的 config.inc.php 文件的样子:

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
//$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;

/**
 * phpMyAdmin configuration storage settings.
 */

/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Storage database and tables */
$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]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$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_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
// $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
// $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';
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';

/**
 * End of servers configuration
 */

最后,我还通过运行以下命令确保在尝试运行 phpmyadmin 之前启动 MySql:

mysql -u root -p

请帮忙!

【问题讨论】:

  • “无法启动 phpmyadmin”到底是什么意思?您是否收到类似 404 或 500 的错误?

标签: mysql phpmyadmin xampp


【解决方案1】:

如果您的 root 帐户没有密码(默认情况下没有密码),请更改此参数

$cfg['Servers'][$i]['AllowNoPassword'] = false;

$cfg['Servers'][$i]['AllowNoPassword'] = true;

这将允许使用没有密码的帐户

但是,如果这是基本配置,我预计 XAMPP 的安装会在 root 上设置密码。因此,您可能需要阅读安装说明以检查他们为 root 用户帐户设置的密码

补充建议

当然,这也可能是您的系统上运行了多个 MYSQL Server,而您实际上正在做的是连接到之前存在的那个,因为它可能是自动启动的,因此在您之前抢占端口 3306开始 XAMPP。

在遇到 XAMPP 之前您是否安装了另一个 MYSQL?

如果是这样,请查看services 管理单元,并查看列表中是否有多个 MYSQL Server 服务。我不记得 XAMPP 是否给它的 MYSQL 赋予了除 MYSQL 之外的特定名称,我现在是 WAMPServer 用户,我使用 XAMPP 已经有几年了。

如果你记得其他 MYSQL Server 上的 root 密码是什么,试试这个,以证明是否是这种情况。

【讨论】:

  • 我已经尝试了两个版本,但它仍然要求输入用户名和密码。我输入“root”作为用户名,并将“AllowNoPassword”方法的密码留空,但它仍然不起作用。同样,我尝试使用“root”作为用户名输入另一个版本的 Ubuntu root 密码,但这也不起作用。
  • 它与您的 Ubuntu root 帐户没有任何关系。
猜你喜欢
  • 2016-01-22
  • 2012-10-10
  • 2012-06-26
  • 2018-09-13
  • 2012-05-21
  • 2014-08-30
  • 2017-07-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多