Laravel 4.2 + MySQL 运行 Codeship 上的 phpunit 说“.. root@localhost 用户访问被拒绝 ..”
Laravel 4.2 + MySQL Running phpunit on Codeship says '.. access denied for user root@localhost ..'
我有一个 Laravel 4.2 和 MySQL web 应用程序集成在 bitbucket 上,并决定使用 Codeship 进行持续集成。
当构建在 Codeship 上执行时,它说,'.. 用户 root@localhost .. 的访问被拒绝'
这是我的 Codeship 命令:
# Set php version through phpenv. 5.3, 5.4 and 5.5 available
phpenv local 5.4
# Install extensions through Pecl
# yes yes | pecl install memcache
# Install dependencies through Composer
composer install --prefer-source --no-interaction
这是 Codeship 测试命令:
phpunit
谢谢!
已解决:
设置命令
# Set php version through phpenv. 5.3, 5.4 and 5.5 available
phpenv local 5.4
# Install extensions through Pecl
# yes yes | pecl install memcache
# Install dependencies through Composer
composer install --prefer-source --no-interaction
php artisan migrate
php artisan db:seed
测试命令
phpunit
环境变量
APP_ENV = codeship
APP_HOST = localhost
APP_DB = test
我有一个 Laravel 4.2 和 MySQL web 应用程序集成在 bitbucket 上,并决定使用 Codeship 进行持续集成。
当构建在 Codeship 上执行时,它说,'.. 用户 root@localhost .. 的访问被拒绝'
这是我的 Codeship 命令:
# Set php version through phpenv. 5.3, 5.4 and 5.5 available
phpenv local 5.4
# Install extensions through Pecl
# yes yes | pecl install memcache
# Install dependencies through Composer
composer install --prefer-source --no-interaction
这是 Codeship 测试命令:
phpunit
谢谢!
已解决:
设置命令
# Set php version through phpenv. 5.3, 5.4 and 5.5 available
phpenv local 5.4
# Install extensions through Pecl
# yes yes | pecl install memcache
# Install dependencies through Composer
composer install --prefer-source --no-interaction
php artisan migrate
php artisan db:seed
测试命令
phpunit
环境变量
APP_ENV = codeship
APP_HOST = localhost
APP_DB = test