2016-09-12 2 views
0

Drushal에서 Drushal로 관리자 암호를 복구하려고합니다. 나는 성공적 Drush를 설치했습니다,하지만 난 drush uli뿐만 아니라 유사한 명령을 실행할 때마다 나는이 오류를 얻을 : 드루팔에 내가 Kalabox을 사용하고Drush uli를 실행할 때 "Drupal Core Database ConnectionNotDefinedException : 지정된 데이터베이스 연결이 정의되지 않았습니다."

Drupal\Core\Database\ConnectionNotDefinedException: The specified database connection is not defined: default in           [error] 
/Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Core/Database/Database.php:361 
Stack trace: 
#0 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Core/Database/Database.php(166): 
Drupal\Core\Database\Database::openConnection('default', 'default') 
#1 [internal function]: Drupal\Core\Database\Database::getConnection('default') 
#2 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Component/DependencyInjection/Container.php(254): call_user_func_array(Array, 
Array) 
#3 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Component/DependencyInjection/Container.php(177): 
Drupal\Component\DependencyInjection\Container->createService(Array, 'database') 
#4 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Component/DependencyInjection/Container.php(494): 
Drupal\Component\DependencyInjection\Container->get('database', 1) 
#5 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Component/DependencyInjection/Container.php(236): 
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) 
#6 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Component/DependencyInjection/Container.php(177): 
Drupal\Component\DependencyInjection\Container->createService(Array, 'cache.backend.d...') 
#7 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Core/Cache/ChainedFastBackendFactory.php(85): 
Drupal\Component\DependencyInjection\Container->get('cache.backend.d...') 
#8 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Core/Cache/CacheFactory.php(79): 
Drupal\Core\Cache\ChainedFastBackendFactory->get('bootstrap') 
#9 [internal function]: Drupal\Core\Cache\CacheFactory->get('bootstrap') 
#10 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Component/DependencyInjection/Container.php(254): call_user_func_array(Array, 
Array) 
#11 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Component/DependencyInjection/Container.php(177): 
Drupal\Component\DependencyInjection\Container->createService(Array, 'cache.bootstrap') 
#12 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Component/DependencyInjection/Container.php(494): 
Drupal\Component\DependencyInjection\Container->get('cache.bootstrap', 1) 
#13 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Component/DependencyInjection/Container.php(236): 
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) 
#14 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Component/DependencyInjection/Container.php(177): 
Drupal\Component\DependencyInjection\Container->createService(Array, 'module_handler') 
#15 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Core/DrupalKernel.php(520): 
Drupal\Component\DependencyInjection\Container->get('module_handler') 
#16 /Users/myusername/.kalabox/apps/canchascrd8/code/core/lib/Drupal/Core/DrupalKernel.php(678): 
Drupal\Core\DrupalKernel->preHandle(Object(Symfony\Component\HttpFoundation\Request)) 
#17 /usr/local/Cellar/drush/8.1.3/libexec/lib/Drush/Boot/DrupalBoot8.php(150): 
Drupal\Core\DrupalKernel->prepareLegacyRequest(Object(Symfony\Component\HttpFoundation\Request)) 
#18 /usr/local/Cellar/drush/8.1.3/libexec/includes/bootstrap.inc(354): Drush\Boot\DrupalBoot8->bootstrap_drupal_full() 
#19 /usr/local/Cellar/drush/8.1.3/libexec/commands/user/user.drush.inc(389): drush_bootstrap(5) 
#20 /usr/local/Cellar/drush/8.1.3/libexec/includes/command.inc(373): drush_user_login() 
#21 /usr/local/Cellar/drush/8.1.3/libexec/includes/command.inc(224): _drush_invoke_hooks(Array, Array) 
#22 /usr/local/Cellar/drush/8.1.3/libexec/includes/command.inc(192): drush_command() 
#23 /usr/local/Cellar/drush/8.1.3/libexec/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array) 
#24 /usr/local/Cellar/drush/8.1.3/libexec/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch() 
#25 /usr/local/Cellar/drush/8.1.3/libexec/drush.php(12): drush_main() 

, 새로운 브랜드. 누구든지 아이디어가 있습니까?

답변

2

Kalabox를 사용하는 경우 앱 폴더의 어딘가에서 kbox drush uli (drush uli 아님)을 사용해야합니다.

당신은 또한 앱 당신은 실제로 드루팔 사이트를 설정 한

  • 에 실제로

    1. 을 확보 할 예정 제거 pantheon.settings.php을 편집하지 않은
    2. (일명 데이터베이스를 생성) PRESSFLOW_SETTINGS envvar에서 데이터베이스 연결 정보를 가져 오는 논리

    Kalabox에서 사이트를 파괴하고 다시 만들거나 Pantheon에서 다른 사이트를 회전시켜 문제를 해결할 가치가 있습니다.

  • +0

    마이크에게 감사드립니다. Kalabox는 나에게 막대한 문제를 주면서 결국 나는 그것을 버리고 MAMP와 함께 갔다. 이제 모든 것이 작동하고있다. – Jonathan