无法使用xampp localhost启动phpmyadmin

时间:2016-02-08 01:04:07

标签: mysql phpmyadmin xampp

我已尝试在以下链接中发布的解决方案,但它没有帮助我: 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

请帮忙!

1 个答案:

答案 0 :(得分:1)

如果您的root帐户没有密码,默认情况下没有密码,请从

更改此参数
gridster

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

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

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

其他建议

当然这也可能是你的系统上运行了多个MYSQL服务器,而你实际做的是连接到之前的那个,因为它可能是AutoStarted,因此在你之前获取端口3306开始XAMPP。

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

如果是这样,请查看$cfg['Servers'][$i]['AllowNoPassword'] = true; snapin,看看列表中是否有多个MYSQL Server服务。我不记得XAMPP是否为MYSQL提供了除MYSQL之外的特定名称,我现在是WAMPServer用户,自从我使用XAMPP以来已经有几年了。

如果您还记得其他MYSQL服务器上的services密码是什么,请尝试这样做,以证明是否属于这种情况。