我正在处理symfony教程,我有问题要通过doctrine获取到
MySQL数据库的数据库连接.开发环境:Mac OS X和XAMPP.
命令PHP symfony doctrine:build-schema给我以下错误信息:
Warning: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/MysqL/MysqL.sock) in /Users/xx/projects/myproject/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.PHP on line 470
PDO Connection Error: sqlSTATE[HY000] [2002] No such file or directory
database.yml中的数据库设置:
all: doctrine: class: sfDoctrineDatabase param: dsn: 'MysqL:host=localhost;dbname=my_project_db' username: root password: root
MysqL正在运行.用户名和密码正确.数据库’my_project_db’存在.
有人会给我一个提示出了什么问题吗?