错误:php bin / console doctrine:database:create

时间:2018-05-28 19:44:38

标签: symfony

php bin / console doctrine:database:create

在AbstractMySQLDriver.php第112行:

驱动程序发生异常:SQLSTATE [HY000] [2002]拒绝连接

在PDOConnection.php第50行:

SQLSTATE [HY000] [2002]拒绝连接

在PDOConnection.php第46行:

SQLSTATE [HY000] [2002]拒绝连接

doctrine:database:create [--shard SHARD] [ - connect [CONNECTION]] [--if-not-exists] [-h | --help] [-q | --quiet] [-v | vv | vvv | --verbose] [-V | --version] [--ansi] [ - no-ansi] [-n | --no-interaction] [-e | - env ENV] [ - -no-debug] [ - ]

胺@胺:/ opt / lampp / htdocs / symphart $ sudo service apache2 restart 胺的[sudo]密码: 胺@胺:/ opt / lampp / htdocs / symphart $ php bin / console doctrine:database:create

在AbstractMySQLDriver.php第112行:

驱动程序发生异常:SQLSTATE [HY000] [2002]拒绝连接

在PDOConnection.php第50行:

SQLSTATE [HY000] [2002]拒绝连接

在PDOConnection.php第46行:

SQLSTATE [HY000] [2002]拒绝连接

doctrine:database:create [--shard SHARD] [ - connect [CONNECTION]] [--if-not-exists] [-h | --help] [-q | --quiet] [-v | vv | vvv | --verbose] [-V | --version] [--ansi] [ - no-ansi] [-n | --no-interaction] [-e | - env ENV] [ - -no-debug] [ - ]

1 个答案:

答案 0 :(得分:0)

是哪个symfony版本的?我可以看到你正在使用lampp,服务正在运行吗?正确的凭据(登录/ passowrd)?