Postgresql ProblBundle数据库:为postgres创建
我已经为symfony2安装了推进包。 我的数据库配置是:Postgresql ProblBundle数据库:为postgres创建,postgresql,symfony,propel,Postgresql,Symfony,Propel,我已经为symfony2安装了推进包。 我的数据库配置是: propel: dbal: driver: pgsql user: postgres password: postgres dsn: pgsql:host=localhost;port=5432;dbname=test_database
propel:
dbal:
driver: pgsql
user: postgres
password: postgres
dsn: pgsql:host=localhost;port=5432;dbname=test_database
options: {}
attributes: {}
当我想从控制台(控制台:数据库:创建)创建此数据库时,我遇到了一个奇怪的错误:无法打开PDO连接[wrapped:SQLSTATE[08006][7]致命:数据库“pgsql”不存在。
我在本地主机上创建了pgsql数据库,一切都很好已成功创建。有人能解释我为什么会出现此错误吗?在mysql上,我创建的数据库没有任何问题。我已通过Composer安装了新的ProperteBundle,现在一切正常。我想可能是1.0捆绑包有问题,现在我有了1.1此问题是ProperteBundle中的一个bug,已由f解决下面的提交(即使提交消息是关于MySQL的,它也会修复其他RDBMS):在不知道推进的情况下,您是否尝试过
pgsql:host=localhost;port=5432;dbname=test\u database;user=postgres;password=postgres
?您在postgres中的数据库是否命名为“pgsql”是的,我试过了,但没用。加布里埃尔:当我创建这个数据库时,一切都正常,但我想知道为什么,dbname是“test_database”而不是“pgsql”,它是一个来自PropelBundle的数据库,几天前被修复了。