mysql - Symfony2 not reading form parameter.yml file on production -
good monday! have working symfony2 proyect, developed in computer (macos) , formerly deployed in heroku, when deployed in centos apache vhost. website works database connection not working. parameters.yml file:
# file auto-generated during composer install parameters: database_host: 127.0.0.1 database_port: null database_name: dbname database_user: dbuser database_password: 8xffdsafdsck
my config.yml file:
# doctrine configuration doctrine: dbal: driver: pdo_mysql host: "%database_host%" port: "%database_port%" dbname: "%database_name%" user: "%database_user%" password: "%database_password%" charset: utf8 server_version: 5.6 # if using pdo_sqlite database driver: # 1. add path in parameters.yml # e.g. database_path: "%kernel.root_dir%/data/data.db3" # 2. uncomment database_path in parameters.yml.dist # 3. uncomment next line: # path: "%database_path%" orm: auto_generate_proxy_classes: "%kernel.debug%" naming_strategy: doctrine.orm.naming_strategy.underscore auto_mapping: true
my config_prod.yml
imports: - { resource: config.yml } #framework: # validation: # cache: validator.mapping.cache.apc # serializer: # cache: serializer.mapping.cache.apc #doctrine: # orm: # metadata_cache_driver: apc # result_cache_driver: apc # query_cache_driver: apc monolog: handlers: main: type: fingers_crossed action_level: error handler: nested nested: type: stream path: "%kernel.logs_dir%/%kernel.environment%.log" level: debug console: type: console
and i'm still getting error on database connection:
[doctrine\dbal\exception\connectionexception] exception occured in driver: sqlstate[hy000] [1045] access denied user ''@'localhost' (using password: no)
what missing tell user, password , database??
Comments
Post a Comment