当我生成命令“php composer.phar install”时,出现以下错误:
{"error":{"type":"PDOException","message":"SQLSTATE[42000] [1044] 拒绝用户 ''@'localhost' 访问数据库 'database'","file":"/var /www/wingtech/wingadmin/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php","line":47}}脚本php artisan优化处理post-install-cmd事件返回错误
http://oi42.tinypic.com/20uc2ma.jpg
奇怪的是,当我在运行作曲家的安装之前在 app/config/database.php 中设置数据库时,不会出现此错误
为了缓解我的 php 版本是 5.4.17
我的 composer.json 是:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.0.*",
"orchestra/asset": "2.0.*"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/library",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "dev"
}
有谁知道可能是什么?