启动phpmyadmin时访问被拒绝

时间:2013-10-31 06:25:50

标签: php phpmyadmin

当我启动php时,我的管理员:dev01.dev/phpmyadmin //dev01.dev是我的本地主机

它出现以下错误:

Welcome to phpMyAdmin

Error

MySQL said: Documentation
#2002 - No such file or directory
The server is not responding (or the local server's socket is not correctly configured).
Connection for controluser as defined in your configuration failed.
Retry to connect

我编辑了配置文件。再次安装phpmyadmin但错误相同。

我的/etc/phpmyadmin/config.inc.php 如下:

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
//$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

/*
 * phpMyAdmin configuration storage settings.
 */

/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
$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]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';

什么是滞后?

2 个答案:

答案 0 :(得分:3)

//身份验证方法(基于配置,http或cookie)

$cfg['Servers'][$i]['auth_type']     = 'http';    

将配置更改为http并尝试.. &安培;取消命令服务器参数

答案 1 :(得分:1)

我意识到你已经解决了它,但是对于将来的搜索,这是我要检查的第一件事:

你确定MySQL服务器正在运行吗?我建议尝试通过命令行客户端连接。像

这样的东西
mysql -u root -p