From a63dbc6ab8080432fceabc58d6fef0e1fdf0de9c Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Thu, 1 Dec 2016 14:13:21 -0500 Subject: [PATCH 1/2] Fixes #720: Fixing MySQL connection issue caused by use of localhost. --- .travis.yml | 7 +------ scripts/travis/.travis.yml | 7 +------ settings/travis.settings.php | 6 +++--- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4786157f7..c9a54fe38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,11 +26,6 @@ notifications: addons: ssh_known_hosts: - svn-5223.devcloud.hosting.acquia.com - apt: - packages: - - mysql-server-5.6 - - mysql-client-core-5.6 - - mysql-client-5.6 before_install: # Decrypt private SSH key id_rsa_blt.enc, save as ~/.ssh/id_rsa_blt. @@ -46,7 +41,7 @@ before_install: - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - git config --global user.name "Travis-CI" - git config --global user.email "noreply@travis-ci.org" - - mysql -u root -e 'CREATE DATABASE drupal;' + - mysql -u root -e "CREATE DATABASE drupal; CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'drupal'; GRANT ALL ON drupal.* TO 'drupal'@'localhost';" install: # Load composer dependencies. diff --git a/scripts/travis/.travis.yml b/scripts/travis/.travis.yml index 6e433a945..efb702de9 100644 --- a/scripts/travis/.travis.yml +++ b/scripts/travis/.travis.yml @@ -25,11 +25,6 @@ cache: addons: ssh_known_hosts: # - svn-4786.devcloud.hosting.acquia.com - apt: - packages: - - mysql-server-5.6 - - mysql-client-core-5.6 - - mysql-client-5.6 # @see https://docs.travis-ci.com/user/notifications notifications: @@ -48,7 +43,7 @@ before_install: - echo "always_populate_raw_post_data = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - git config --global user.name "Travis-CI" - git config --global user.email "noreply@travis-ci.org" - - mysql -u root -e 'CREATE DATABASE drupal;' + - mysql -u root -e "CREATE DATABASE drupal; CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'drupal'; GRANT ALL ON drupal.* TO 'drupal'@'localhost';" install: # Load composer dependencies. diff --git a/settings/travis.settings.php b/settings/travis.settings.php index ae03c0fcd..e5bbec26c 100644 --- a/settings/travis.settings.php +++ b/settings/travis.settings.php @@ -4,9 +4,9 @@ 'default' => array( 'default' => array( 'database' => 'drupal', - 'username' => 'root', - 'password' => '', - 'host' => 'localhost', + 'username' => 'drupal', + 'password' => 'drupal', + 'host' => '127.0.0.1', 'port' => '3306', 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', 'driver' => 'mysql', From 85a2d0f96efa0992fb8a6aa17c89894e93b48314 Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Thu, 1 Dec 2016 21:44:46 -0500 Subject: [PATCH 2/2] Use JDK 8. --- .travis.yml | 2 ++ scripts/travis/.travis.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index c9a54fe38..d73aef5d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,6 +61,8 @@ install: - sh -e /etc/init.d/xvfb start # Installs chromedriver to vendor/bin. - ./scripts/linux/install-chrome.sh $TRAVIS_BUILD_DIR/vendor/bin + # Use JDK 8. + - jdk_switcher use oraclejdk8 before_script: # Clear drush release history cache, to pick up new releases. diff --git a/scripts/travis/.travis.yml b/scripts/travis/.travis.yml index efb702de9..57ed47f9c 100644 --- a/scripts/travis/.travis.yml +++ b/scripts/travis/.travis.yml @@ -61,6 +61,8 @@ install: - sh -e /etc/init.d/xvfb start # Installs chromedriver to vendor/bin. - ./vendor/acquia/blt/scripts/linux/install-chrome.sh $TRAVIS_BUILD_DIR/vendor/bin + # Use JDK 8. + - jdk_switcher use oraclejdk8 before_script: # Clear drush release history cache, to pick up new releases.