juva jacob
juva jacob

Reputation: 115

Phpmyadmin is not working in xampp

I have recently installed xampp v3.2.2.start apache and and mysql when i try to access php my admin i got an error

MySQL said: Documentation
#2002 - No connection could be made because the target machine actively refused it.
— The server is not responding (or the local server's socket is not correctly configured).
mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it.
Connection for controluser as defined in your configuration failed.
mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it.
Retry to connect

I did the following changes update config.inc.php change

`$cfg['Servers'][$i]['controluser'] = 'pma' to $cfg['Servers'][$i]['controluser'] = 'root';` 

and

$cfg['Servers'][$i]['host'] = '127.0.0.1'

to

$cfg['Servers'][$i]['host'] = 'localhost:8080';

delete ib_logfile0 file and ib_logfile restart apache..but still the same error.please help me

Upvotes: 1

Views: 9953

Answers (4)

Rokonz Zaz
Rokonz Zaz

Reputation: 176

I have run MYSQL on port 3333, it will change the port inside of config.inc.php file.

$cfg['Servers'][$i]['host'] = '127.0.0.1' 

to   

$cfg['Servers'][$i]['host'] = '127.0.0.1:3333'

It works, Fine!

Thanks!

Upvotes: 2

jay thanki
jay thanki

Reputation: 1460

I had faced same issue because i had change file

xampp/mysql/bin/my.ini

I solved by Below changes //it should be 3306 default.

[client]

# password       = your_password 
port            = 3307 **//it should be 3306 default.**
socket          = "C:/xampp/mysql/mysql.sock"

# The MySQL server
[mysqld] 
port= 3307 **//it should be 3306 default.**
socket = "C:/xampp/mysql/mysql.sock"

Restart apache and mysql services in xampp

Hope this will help you.

Upvotes: 2

LanK
LanK

Reputation: 76

The following steps worked for me:

  1. Go to the data folder of MySQL(on windows using default installation you should find on this path C:\xampp\mysql\data)

  2. Backup Log files and delete them: make backup copies of these two files ib_logfile0 and ib_logfile1 (Note that they are created during the runtime for InnoDB removing them will solve your most likely solve the problem, nonetheless I'd recommend you make copies of the aforementioned files somewhere else, in case deleting doesn't fix the problem. Now delete them from the original directory xampp\mysql\data

  3. Restart MySQL and Apache, Hope it helps someone out there who got stuck on this problem like myself.

Upvotes: 2

Philipp
Philipp

Reputation: 15639

MySQL runs on port 3306 and not on port 8080, so you have to change the port inside config.inc.php.

$cfg['Servers'][$i]['host'] = '127.0.0.1:8080' to   $cfg['Servers'][$i]['host'] = '127.0.0.1:3306'

Upvotes: 1

Related Questions