2

/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 外壳

/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)

问题的可能原因是什么?

4

1 回答 1

0

我的密码包含一个@引起问题的字符。

于 2012-07-02T13:25:36.973 回答