S
S
Sergey Nizhny Novgorod2018-08-20 17:22:56
symfony
Sergey Nizhny Novgorod, 2018-08-20 17:22:56

Why doesn't Doctrine create the database?

Hello everyone
, I put it on my computer:

  • phpstrom
  • php latest stable version
  • In symphony, I registered the configuration for env. = DATABASE_URL=mysql://root:[email protected]:3306/dbcat
  • in php.ini file uncommented (extension=mysqli / extension=pdo_mysql)

I run the command: php bin/console doctrine:database:create
I get:
In AbstractMySQLDriver.php line 113:
                                                                                                                                             
  An exception occurred in driver: SQLSTATE[HY000] [2002]   , ..      .                                                                                                                                             

In PDOConnection.php line 50:
                                                                                                            
  SQLSTATE[HY000] [2002]   , ..      .                                                                                                             

In PDOConnection.php line 46:
                                                                                                           
  SQLSTATE[HY000] [2002]   , ..      .

What could be wrong and where to look?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Nizhny Novgorod, 2018-08-20
@Terras

Understood the situation. It was necessary to install MySQL from the official Oracle website and register all accesses for it. Unlike PyCharm (Django), which stores all the configs and the database, in php you have to set everything manually.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question