首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Xampp localhost/phpmyadmin错误

问Xampp localhost/phpmyadmin错误
EN

Stack Overflow用户
提问于 2012-06-25 09:16:53
回答 3查看 3.2K关注 0票数 0

每次我尝试访问我的本地主机/phpmyadmin时,它都会给我这个错误-> error MySQL说:

2002 -服务器没有响应(或本地MySQL服务器的套接字配置不正确)

按照配置中定义的方式连接controluser失败。

求求你,我真的需要你的帮助,我一无所知。下面是我的config.inc.php文件,非常感谢你的帮助!

代码语言:javascript
复制
<?php
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'xampp'; 

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

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

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

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

/*
* End of servers configuration
*/

?>
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-06-25 09:20:33

在linux系统上,您应该将以下内容添加到config.inc.php中

代码语言:javascript
复制
$cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock';
    or
$cfg['Servers'][$i]['connect_type'] = 'tcp';

在windows系统上,

代码语言:javascript
复制
 $cfg['Servers'][$i]['socket'] = "c:/tmp/mysql.sock"

同样的更改也必须反映在xampp\mysql\bin\my.ini文件中。

票数 0
EN

Stack Overflow用户

发布于 2012-06-25 09:24:52

从Mysql documentation

错误(2002)无法连接到...正常情况下,表示系统上没有运行MySQL服务器,或者您在尝试连接到服务器时使用了不正确的Unix套接字文件名或TCP端口号。您还应该检查您正在使用的TCP/IP端口是否未被防火墙或端口阻止服务阻止。

票数 1
EN

Stack Overflow用户

发布于 2013-01-06 14:51:29

当我尝试打开phpmyadmin时,我也得到了同样的错误,我从我的系统中删除了mecafee,然后我重新启动了系统,从那时起它工作正常,可能是mecafee(anit病毒)的问题…希望它对你有用...

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11182503

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档