生产环境中的 Doctrine 模式更新错误
Doctrine schema update Error in prod environnement
当我向主机上的控制台 运行 命令 doctrine:schema:update 时出现错误。然后,当我尝试访问我的数据库时,出现 MySQL 错误。
# This file is auto-generated during the composer install
parameters:
database_host: trendspopdmaster.mysql.db
database_port: null
database_name: MyDbName
database_user: MyDbLogin
database_password: *****
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
secret: 90146e6046fs01d1d529c739f1202f94fc74defd
我想访问我的数据库时犯的错误:
An exception occured in driver: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '\/var\/run\/mysqld\/mysqld.sock' (2)
运行执行命令时我的错误:
ATTENTION: This operation should not be executed in a production environment.
Use the incremental update to detect changes during development and use
the SQL DDL provided to manually update your database in production.
我解决了这个问题。清除缓存就足够了。
当我向主机上的控制台 运行 命令 doctrine:schema:update 时出现错误。然后,当我尝试访问我的数据库时,出现 MySQL 错误。
# This file is auto-generated during the composer install
parameters:
database_host: trendspopdmaster.mysql.db
database_port: null
database_name: MyDbName
database_user: MyDbLogin
database_password: *****
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
secret: 90146e6046fs01d1d529c739f1202f94fc74defd
我想访问我的数据库时犯的错误:
An exception occured in driver: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '\/var\/run\/mysqld\/mysqld.sock' (2)
运行执行命令时我的错误:
ATTENTION: This operation should not be executed in a production environment.
Use the incremental update to detect changes during development and use
the SQL DDL provided to manually update your database in production.
我解决了这个问题。清除缓存就足够了。