php - Cannot create database with terminal doctrine:database:create -
i cannot succeed in creating database symfony throught terminal
(i use mac , mamp)
the line in terminal
macbook-pro-de-xxx:symfony xxx$ php app/console doctrine:database:create
the answer got in terminal
warning: pdo::__construct(): mysql server has gone away in /applications/mamp/htdocs/symfony/vendor/doctrine/dbal/lib/doctrine/dbal/driver/pdoconnection.php on line 40 warning: pdo::__construct(): error while reading greeting packet. pid=52773 in /applications/mamp/htdocs/symfony/vendor/doctrine/dbal/lib/doctrine/dbal/driver/pdoconnection.php on line 40 not create database connection named `symfony` sqlstate[hy000] [2006] mysql server has gone away
here other information might me find probleme come from
the parameters.yml file in symfony/app/config
# file auto-generated during composer install parameters: database_driver: pdo_mysql database_host: localhost:8888 database_port: null database_name: symfony database_user: root database_password: root mailer_transport: smtp mailer_host: 127.0.0.1 mailer_user: null mailer_password: null locale: en secret: thistokenisnotsosecretchangeit
modify host. if have running mysql service on port 8888 configuration should as
database_host: localhost database_port: 8888
if mysql running on default port, use below configuration
database_host: localhost database_port: null
hope helps.
sorry bad english.
Comments
Post a Comment