No connection could be made because the target mac

2019-01-08 00:33发布

When I was trying to connect my phpmyadmin on my XAMPP, it gave an error:

#2002 - No connection could be made because the target machine actively refused it. 

Can any help me to resolve it?

9条回答
唯我独甜
2楼-- · 2019-01-08 01:09

Sometimes if you delete your temporary files in windows in

C:\Windows\Temp

and

C:\Users\YourUser\AppData\Local\Temp

it works.

查看更多
祖国的老花朵
3楼-- · 2019-01-08 01:12

Please go to c:\xampp\tmp folder and delete all the files. It works for me may help you.

查看更多
Bombasti
4楼-- · 2019-01-08 01:13

Please try changing connect_type in your config.inc.php from 'tcp' to 'http'. This file exists in the phpMyAdmin top level directory.

Existing line looks like this:

$cfg['Servers'][$i]['connect_type'] = 'tcp';

New line should be looking like this:

$cfg['Servers'][$i]['connect_type'] = 'http';
查看更多
在下西门庆
5楼-- · 2019-01-08 01:15

Go to

C:\Users\YourUser\AppData\Local\Temp

Delete all the files.It will work.

查看更多
迷人小祖宗
6楼-- · 2019-01-08 01:20

If your operating system is Windows 7:

  • go to control panel -> Administrative Tools -> Services
  • find mysql then right-click, click start

If your operating system is Linux (Ubuntu):

  • in terminal type this command: sudo /etc/init.d/mysql start

Good Luck

查看更多
啃猪蹄的小仙女
7楼-- · 2019-01-08 01:26

Instead of localhost, type this in your address bar localhost:<PORT> (e.g. localhost:88)

查看更多
登录 后发表回答