Reputation: 912
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?
Upvotes: 20
Views: 123288
Reputation: 9
Just insures that the port no. in file - phpmyadmin (config.inc.php) and my.ini are same (mostly 3306) and not use by any other process
Upvotes: 0
Reputation: 547
Check if your MySql service is running or not.
You can check it by searching Services in Start and then check the status of mysql80 service. If your service is not running then start service by right clicking on it and then Start.
Or you can use CMD.
Open Command Prompt as administrator and then run net start mysql80
.
Upvotes: 0
Reputation: 933
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.
Upvotes: 23
Reputation: 135
Go to
C:\Users\YourUser\AppData\Local\Temp
Delete all the files.It will work.
Upvotes: 11
Reputation: 419
Please go to c:\xampp\tmp
folder and delete all the files.
It works for me may help you.
Upvotes: 5
Reputation: 61
Instead of localhost
, type this in your address bar localhost:<PORT>
(e.g. localhost:88
)
Upvotes: 2
Reputation: 196
Sometimes if you delete your temporary files in windows in
C:\Windows\Temp
and
C:\Users\YourUser\AppData\Local\Temp
it works.
Upvotes: 1
Reputation: 21
Assuming you're trying to connect to http://localhost/phpmyadmin.
From XAMPP control panel start both the Apache module and the MySQL module.
Upvotes: 2
Reputation: 49
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';
Upvotes: 3
Reputation: 3532
Go to :
xampp/phpmyadmin/config.inc.php
open the file config.inc.php Go to line no:31
$cfg['Servers'][$i]['controluser'] = 'pma';
Change the line to :
$cfg['Servers'][$i]['controluser'] = 'root';
Restart your system.
Upvotes: 8
Reputation: 644
If your operating system is Windows 7:
If your operating system is Linux (Ubuntu):
Good Luck
Upvotes: 7