Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused #39

Open
ajabusch opened this issue Oct 8, 2020 · 0 comments

Comments

@ajabusch
Copy link

ajabusch commented Oct 8, 2020

Hi I followed the instructions in the readme, but I got an error at

php bin/console doctrine:schema:create

saying:

    In ToolsException.php line 34:
                                                                                                                                                                                          
      Schema-Tool failed with Error 'An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused' while executing DDL: CREATE TABLE fos_user (id INT AUTO_INCREMENT NOT N  
      ULL, username VARCHAR(180) NOT NULL, username_canonical VARCHAR(180) NOT NULL, email VARCHAR(180) NOT NULL, email_canonical VARCHAR(180) NOT NULL, enabled TINYINT(1) NOT NULL, sa  
      lt VARCHAR(255) DEFAULT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL, password_requested_at DATETIME DEFAU  
      LT NULL, roles LONGTEXT NOT NULL COMMENT '(DC2Type:array)', UNIQUE INDEX UNIQ_957A647992FC23A8 (username_canonical), UNIQUE INDEX UNIQ_957A6479A0D96FBF (email_canonical), UNIQUE   
      INDEX UNIQ_957A6479C05FB297 (confirmation_token), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB                                       
                                                                                                                                                                                          

    In AbstractMySQLDriver.php line 112:
                                                                                  
      An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused  
                                                                                  

    In Exception.php line 18:
                                                 
      SQLSTATE[HY000] [2002] Connection refused  
                                                 

    In PDOConnection.php line 37:
                                                 
      SQLSTATE[HY000] [2002] Connection refused  

and (maybe related) when loading the fixtures

php bin/console doctrine:fixtures:load

I get

    In AbstractMySQLDriver.php line 112:
                                                                                  
      An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused  
                                                                                  

    In Exception.php line 18:
                                                 
      SQLSTATE[HY000] [2002] Connection refused  
                                                 

    In PDOConnection.php line 37:
                                                 
      SQLSTATE[HY000] [2002] Connection refused  

(DB container is running and accessible from host via port 5432)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant