简体   繁体   中英

Xampp localhost/phpmyadmin error

Every time I try to access my localhost/phpmyadmin it gives me this error ---> Error MySQL said:

2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

Connection for controluser as defined in your configuration failed.

Please I really need your help, I'm clueless. Below is my config.inc.php file Thanks a lot for your help!

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

?>

From the Mysql documentation :
The error (2002) Can't connect to ... normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when trying to connect to the server. You should also check that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.

On a linux system, you should add the following to your config.inc.php

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

On a windows system,

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

The same changes must be reflected in your xampp\\mysql\\bin\\my.ini file as well.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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