Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No connection could be made because the target machine actively refused it (PHP / WAMP)

Tags:

Note: I realise this could be seen as a duplicate but i have looked at the other responses and they didn't fix the problem for me.


I have recently installed Zend Studio and Zend Server with the mysql plugin on Windows 7.

I am not a qualified server administrator but neither am i completely incompetent; i have dedicated my day trying to get a local development 'server' up to cut down on upload/download times.

When I say server/machine i mean my home computer

I have come to a grinding halt trying to get mysql to work with Zend Server.

The error I keep receiving is (or verbose):

#2002 Cannot log in to the MySQL server or (if i change to 'config' authentication type) #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). 

I have tried:

  • Change $cfg['Servers'][$i]['host'] from 'localhost' to '127.0.0.1'
  • Add/Remove $cfg['Servers'][$i]['socket'] = '';
  • Change from cookie to config auth type
  • reinstall server and mysql
  • Disable firewalls
  • Restarting machine

Zend's approach was to 'configure the phpmyadmin setup screen'... done that i don't know how many times.

Can anyone on here lend a hand, or point me in a direction that I haven't tried yet?

like image 280
Edward Avatar asked Jul 17 '13 18:07

Edward


People also ask

How do you fix no connection could be made because the target machine actively refused it?

You can try below solution: You might have a firewall rule in the way, or are trying to run it through a proxy without having the proxy up and running. The easiest way to check would be to disable your firewall or proxy and try again. Disable proxy at web.


2 Answers

  1. Go to C:\wamp\bin\mysql\mysql[your-version]\data
  2. Copy and save "ib_logfile0" and "ib_logfile1" anywhere else.
  3. delete "ib_logfile0" and ib_logfile1

Did the trick for me. hope it works for you too.

Its working fine. But we will have to stop apache and mysql, We need to quit xampp and then delete file. when deleted successfully. now start xampp it will work properly..

like image 154
Wajdan Zahid Avatar answered Sep 21 '22 13:09

Wajdan Zahid


Just Go to your Control-panel and start Apache & MySQL Services.

like image 38
hashkishor Avatar answered Sep 19 '22 13:09

hashkishor