When I was trying to connect my phpmyadmin
on my XAMPP
, it gave an error:
#2002 - No connection could be made because the target m
Okay, so i tried all of the answers and none of them worked. If you are using different port than 3306 for MySQL you need to specify it in config.inc.php.
So since i was using port 3308, my solution was adding the following line in config.inc.php:
$cfg['Servers'][$i]['port'] = 3308;
add it right bellow the user, password or extension lines.
Please go to c:\xampp\tmp
folder and delete all the files.
It works for me may help you.
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';
Sometimes if you delete your temporary files in windows in
C:\Windows\Temp
and
C:\Users\YourUser\AppData\Local\Temp
it works.
Go to
C:\Users\YourUser\AppData\Local\Temp
Delete all the files.It will work.
Instead of localhost
, type this in your address bar localhost:<PORT>
(e.g. localhost:88
)