2012-11-26 35 views
1

我想在我的机器上设置phpmyadmin,并在初始设置和安装xampp后,我得到下面的错误。我试图通过修改config.inc.php文件来解决这个问题很长一段时间,但没有成功。我想知道是否有人遇到类似的问题,并可能能够帮助我解决这个问题?phpmyadmin初始设置生成错误

http://i50.tinypic.com/10ejyo8.png

config.inc.php文件

<?php 
/* 
* This is needed for cookie based authentication to encrypt password in 
* cookie 
*/ 
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */ 

/* 
* Servers configuration 
*/ 
$i = 0; 

/* 
* First server 
*/ 
$i++; 

/* Authentication type and info */ 
$cfg['Servers'][$i]['auth_type'] = 'HTTP'; 
$cfg['Servers'][$i]['user'] = 'myusername'; 
$cfg['Servers'][$i]['password'] = ''; 
$cfg['Servers'][$i]['extension'] = 'mysql'; 
$cfg['Servers'][$i]['AllowNoPassword'] = false; 
$cfg['Lang'] = ''; 

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

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

/* 
* End of servers configuration 
*/ 

?> 

回答

2

好像你正在尝试使用先进的功能,但使用指定的用户名/密码的phpmyadmin无法连接到MySQL:

/* User for advanced features */ 
$cfg['Servers'][$i]['controluser'] = 'pma'; 
$cfg['Servers'][$i]['controlpass'] = ''; 

/* Advanced phpMyAdmin features */ 
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; 

在这里使用正确的mysql用户/密码对,或者注释掉这些行,如果你不想要高级功能。此外,pmadb(默认情况下为phpmyadmin)的数据库也必须存在(此数据库的目的是存储phpmyadmin特定的数据)。如果没有,请手动创建它,并确保您的mysql用户具有完全访问权限。

+0

感谢您的回复。评论所有高级功能,但在上述区域输入正确的用户名和密码并没有帮助。我感谢帮助:) – AnchovyLegend

+0

@MHZ查看更新的答案,也许这就是问题所在 – galymzhan