Search code examples
symfonysymfony-3.3dbal

My Symfony 3.3 website is displaying blank


When I run my website www.example.com it shows blank. And when I run www.example.com/app_dev.php the following error is displayed.

An exception occurred in driver: SQLSTATE[28000] [1045] Access denied for user 'myuser'@'localhost' (using password: YES)

Parameters.yml

parameters:
database_host: localhost
database_port: null
database_name: mydb
database_user: myuser
database_password: 'Myuser123'
mailer_transport: smtp
mailer_host: mail.smtp2go.com
mailer_user: [email protected]
mailer_password: YzA3NTMyY2c1aDkw
secret: d51a96a676b308372c91a26e65ff27cb5eb02e37

Till now I have tried following.

a. Password: null
b. user: root

Cleaned cache several ,but same error. All privilege is given.


Solution

  • Change

    database_host: localhost
    

    into

    database_host: 127.0.0.1
    

    then clear your cache:

    bin/console c:c --env=dev
    bin/console c:c --env=prod