繁体   English   中英

Xampp localhost / phpmyadmin错误

[英]Xampp localhost/phpmyadmin error

每次我尝试访问localhost / phpmyadmin时,都会出现此错误--->错误MySQL说:

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

在配置中定义的controluser的连接失败。

请我真的需要您的帮助,我一无所知。 以下是我的config.inc.php文件:非常感谢您的帮助!

<?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
*/

?>

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

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

$cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock';
    or
$cfg['Servers'][$i]['connect_type'] = 'tcp';

在Windows系统上,

 $cfg['Servers'][$i]['socket'] = "c:/tmp/mysql.sock"

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM