Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
783 views
in Technique[技术] by (71.8m points)

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

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  1. Go to C:wampinmysqlmysql[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..


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...