2

This is frustrating. My set up worked fine on my dev machine, but gives me a

SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

error when deployed to shared hosting. My parameters.yml:

# This file is auto-generated during the composer install
parameters:
    database_driver: pdo_mysql
    database_host: mysql.server322.com
    database_port: 3306
    database_name: adirule_db
    database_user: adirule
    database_password: Ref1ect0b0l1!
    mailer_transport: smtp
    mailer_host: localhost
    mailer_user: null
    mailer_password: null
    locale: en
    secret: ThisTokenIsNotSoSecretChangeIt

config.yml:

# Doctrine Configuration
doctrine:
    dbal:
        driver:   %database_driver%
        host:     %database_host%
        port:     %database_port%
        dbname:   %database_name%
        user:     %database_user%
        password: %database_password%
        charset:  UTF8
        # if using pdo_sqlite as your database driver, add the path in parameters.yml
        # e.g. database_path: %kernel.root_dir%/data/data.db3
        # path:     %database_path%

    orm:
        auto_generate_proxy_classes: %kernel.debug%
        auto_mapping: true

fos_user:
    db_driver: orm

I don't know where to look/how to fix this issue as I've never seen it before. It looks like it's bypassing my db user/password combo and defaulting to root/no password.

Any suggestions?

4

1 回答 1

4

Oddly, clearing the cache via $ app/console cache:clear --env=prod fixed it. No idea why. Hopefully it stays fixed and isn't some sort of lucky coincidence.

于 2013-10-03T00:43:10.363 回答