Skip to content

Commit

Permalink
Fixes #720: Fixing MySQL connection issue caused by use of localhost. (
Browse files Browse the repository at this point in the history
…#722)

* Fixes #720: Fixing MySQL connection issue caused by use of localhost.

* Use JDK 8.
  • Loading branch information
grasmash authored Dec 2, 2016
1 parent cbba911 commit b8af586
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 "[email protected]"
- 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.
Expand All @@ -66,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.
Expand Down
9 changes: 3 additions & 6 deletions scripts/travis/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 "[email protected]"
- 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.
Expand All @@ -66,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.
Expand Down
6 changes: 3 additions & 3 deletions settings/travis.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit b8af586

Please sign in to comment.