0
votes

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 ?

1
"because the target machine actively refused it".xdazz
That port looks odd. Are you sure your DB server listens on it? Can you connect with some other tool?Maerlyn
Possible duplicate conetent : stackoverflow.com/questions/2972600/…. Else maybe go to see this article : codeproject.com/Questions/58761/…Antoine Subit

1 Answers

1
votes

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.