脚本宝典收集整理的这篇文章主要介绍了php – Gitlab CI Symfony:SQLSTATE [HY000] [2002] Connection拒绝了,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_403_7@
> Incenteev\ParameterHandler\ScriptHandler::buildParameters Creating the "app/config/parameters.yML" file > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache [Doctrine\DBAL\Exception\ConnectionException] An exception occured in driver: sqlstatE[HY000] [2002] Connection refused [Doctrine\DBAL\Driver\PDOException] sqlSTATE[HY000] [2002] Connection refused [PDOException] sqlSTATE[HY000] [2002] Connection refused Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception@H_403_7@这是我的配置: @H_403_7@
# Select image From https://hub.docker.COM/_/PHP/ image: PHP:5.6 # Select what we should cache cache: paths: - vendor/ before_script: # Install ssh-agent if not already installed,it is required by Docker. # (change apt-get to yum if you use a CentOS-based image) - 'which ssh-agent || ( apt-get update -y && apt-get install oPEnssh-client -y )' # Run ssh-agent (inside the build environment) - eval $(ssh-agent -s) # Add the SSH key Stored in SSH_PRIVATE_KEY VARiable to the agent store - ssh-add <(echo "$SSH_PRIVATE_KEY") # For Docker builds disable host key checking. Be aware that by adding that # you are SUSPECTible to man-in-the-middle attacks. # WARNING: Use this only with the Docker executor,if you use it with shell # you will overwrite your user's SSH config. - mkdir -p ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - cp ci/custom.ini /usr/local/etc/PHP/conf.d/custom.ini - bash ci/docker_install.sh > /dev/null # Install composer - curl -sS https://getcomposer.org/installer | PHP services: - MysqL:latest variables: # Configure MysqL service (https://hub.docker.com/_/MysqL/) MysqL_DATABASE: symfony MysqL_ROOT_PASSWORD: root # We test PHP5.6 (the default) with MysqL test:MysqL: script: # Install all project dependencies - PHP composer.phar install - PHPunit --coverage-text --colors=never -c app/@H_403_7@parameters.yml.dist @H_403_7@
parameters: database_host: 127.0.0.1 database_port: ~ database_name: symfony database_user: root database_password: root mailer_transport: smtp mailer_host: 127.0.0.1 mailer_user: ~ mailer_password: ~ # A secret key that's used to generate certain security-related tokens secret: ThisTokenIsNotSoSecretChangeit database_slave1_host: 127.0.0.1 database_slave1_port: ~ database_slave1_name: symfony database_slave1_user: root database_slave1_password: root@H_403_7@我已阅读并遵循gitlab网站的说明.也许我的错误是显而易见的,但我看不到它.
以上是脚本宝典为你收集整理的php – Gitlab CI Symfony:SQLSTATE [HY000] [2002] Connection拒绝了全部内容,希望文章能够帮你解决php – Gitlab CI Symfony:SQLSTATE [HY000] [2002] Connection拒绝了所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。