/app/config/parameters.ini
[parameters]
database_driver = pdo_mysql
database_host = localhost
database_port =
database_name = my_dbname
database_user = my_user
database_password = my_password
Linux shell
/var/www/Symfony$ mysql -u my_user -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
...
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| my_dbname |
| test |
+--------------------+
mysql> Bye
/var/www/Symfony$ php app/console doctrine:schema:create
[PDOException]
SQLSTATE[28000] [1045] Access denied for user 'my_user'@'localhost' (using pa
ssword: YES)
可能导致问题的原因是什么?
答案 0 :(得分:0)
我的密码包含@
字符,这就是问题所在。