【发布时间】:2018-01-15 16:09:42
【问题描述】:
当我想用 wamp server 创建一个新数据库时出现这个错误。我该如何解决
$ 应用程序/控制台原则:数据库:创建无法创建数据库 名为 default 的连接的“symfony”驱动程序中发生异常: SQLSTATE[HY000] [14] 无法打开数据库文件
parameters.yml:
database_driver: pdo_sqlite
database_host: 127.0.0.1
database_port: null
database_name: symfony
database_user: root
database_password: null
database_path: '%kernel.root_dir%/data/blog.sqlite'
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
locale: en
secret: secret_value_for_symfony_demo_application
parameters.yml.dist:
# This file defines the canonical configuration parameters of the application.
# Symfony uses this file as a template to generate the real app/config/parameters.yml
# used by the application.
# See
http://symfony.com/doc/current/best_practices/configuration.html#canonical-parameters
parameters:
# this demo application uses an embedded SQLite database to simplify setup.
# in a real Symfony application you probably will use a MySQL or PostgreSQL database
database_driver: pdo_sqlite
database_host: 127.0.0.1
database_port: ~
database_name: symfony
database_user: root
database_password: ~
# the 'database_path' is only used for SQLite type databases
database_path: %kernel.root_dir%/data/blog.sqlite
# Uncomment these lines to use a MySQL database instead of SQLite:
#
# database_driver: pdo_mysql
# database_host: 127.0.0.1
# database_port: null
# database_name: symfony_demo
# database_user: root
# database_password: null
#
# You can even create the database and load the sample data from the command line:
#
# $ cd your-symfony-project/
# $ php app/console doctrine:database:create
# $ php app/console doctrine:schema:create
# $ php app/console doctrine:fixtures:load
# If you don't use a real mail server, you can send emails via your Gmail account.
# see http://symfony.com/doc/current/cookbook/email/gmail.html
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: ~
mailer_password: ~
# The code of the default language used by the application ('en' = English)
locale: en
# The 'secret' value is a random string of characters, numbers and symbols
# used internally by Symfony in several places (CSRF tokens, URI signing,
# 'Remember Me' functionality, etc.)
# see: http://symfony.com/doc/current/reference/configuration/framework.html#secret
secret: 'secret_value_for_symfony_demo_application'
【问题讨论】:
标签: mysql angularjs api symfony