0

I am trying to connect to a db using Symfony2. However it returns:

Internal server error SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. "

Details about the error

[1/2] ErrorException: Warning: PDO::__construct(): [2002] No connection could be made because the target machine actively refused it. (trying to connect via tcp://localhost:7555) in C:\wamp\www\Symfony\vendor\doctrine-dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php line 36

Can anyone help me solve this error ?

Community
  • 1
  • 1
Manish Basdeo
  • 6,139
  • 22
  • 68
  • 102
  • "because the target machine actively refused it". – xdazz Feb 06 '12 at 15:27
  • 1
    That port looks odd. Are you sure your DB server listens on it? Can you connect with some other tool? – Maerlyn Feb 06 '12 at 19:08
  • Possible duplicate conetent : http://stackoverflow.com/questions/2972600/no-connection-could-be-made-because-the-target-machine-actively-refused-it. Else maybe go to see this article : http://www.codeproject.com/Questions/58761/No-connection-could-be-made-because-the-target-ma – Antoine Subit May 23 '14 at 09:47

1 Answers1

1

This happen when the SQL Server is not started yet. Start your MySQL Server in your XAMPP, WAMP, LAMP or any server that you use.

Player1
  • 2,878
  • 2
  • 26
  • 38