Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression of MySQL Error #1526

Closed
mikemadison13 opened this issue May 18, 2017 · 6 comments
Closed

Regression of MySQL Error #1526

mikemadison13 opened this issue May 18, 2017 · 6 comments
Labels
Bug Something isn't working

Comments

@mikemadison13
Copy link
Contributor

My system information:

  • Operating system type: Mac OS
  • Operating system version: 10.11.6
  • BLT version: 8.x.dev (8.9.x -- 531b7e8)

Output of blt doctor:

+----------------------+--------------------------------------------------------------------------------+
| Property             | Value                                                                          |
+----------------------+--------------------------------------------------------------------------------+
| %paths               |                                                                                |
|  - %root             | /var/www/<project>/docroot                                                         |
|  - %site             | sites/default                                                                  |
|  - %modules          | modules                                                                        |
|  - %themes           | themes                                                                         |
|  - %config-sync      | ../config/default                                                              |
|  - %files            | sites/default/files                                                            |
|  - %private          | /var/www/<project>/files-private                                                   |
|  - %temp             | /tmp                                                                           |
| admin-theme          | seven                                                                          |
| blt-version          | 8.x-dev                                                                        |
| bootstrap            | Successful                                                                     |
| config-sync          | ../config/default                                                              |
| db-driver            | mysql                                                                          |
| db-hostname          | localhost                                                                      |
| db-name              | drupal                                                                         |
| db-password          | drupal                                                                         |
| db-port              | 3306                                                                           |
| db-status            | Connected                                                                      |
| db-username          | drupal                                                                         |
| drupal-settings-file | sites/default/settings.php                                                     |
| drupal-version       | 8.3.2                                                                          |
| drush-alias-files    | /var/www/<project>/docroot/../drush/site-aliases/aliases.drushrc.php               |
|                      | /var/www/<project>/docroot/../drush/site-aliases/example.acsf.aliases.drushrc.php  |
|                      | /var/www/<project>/docroot/../drush/site-aliases/example.local.aliases.drushrc.php |
|                      | /var/www/<project>/docroot/../drush/site-aliases/mtav2.aliases.drushrc.php         |
|                      | /var/www/<project>/docroot/../drush/site-aliases/pcac.aliases.drushrc.php          |
| drush-conf           | /var/www/<project>/drush/drushrc.php                                               |
| drush-script         | /var/www/<project>/vendor/drush/drush/drush.php                                    |
| drush-temp           | /tmp                                                                           |
| drush-version        | 8.1.11                                                                         |
| files                | sites/default/files                                                            |
| install-profile      | lightning                                                                      |
| local-drushrc        | /var/www/<project>/docroot/sites/default/local.drushrc.php                         |
| local-settings       | /var/www/<project>/docroot/sites/default/settings/local.settings.php               |
| modules              | modules                                                                        |
| php-bin              | /usr/bin/php                                                                   |
| php-conf             | /etc/php/5.6/cli/php.ini                                                       |
| php-os               | Linux                                                                          |
| private              | /var/www/<project>/files-private                                                   |
| root                 | /var/www/<project>/docroot                                                         |
| site                 | sites/default                                                                  |
| temp                 | /tmp                                                                           |
| theme                | <project>2                                                                         |
| themes               | themes                                                                         |
| uri                  | http://local.<project>.com                                                         |
| user                 |                                                                                |
+----------------------+--------------------------------------------------------------------------------+
+--------------------------+---------------------------------------------------------------------------------+
| Check                    | Outcome                                                                         |
+--------------------------+---------------------------------------------------------------------------------+
| checkDocrootExists       | Found docroot.                                                                  |
| checkCoreExists          | Drupal core exists                                                              |
| checkSettingsFile        | BLT settings are included in settings file.                                     |
| checkLocalSettingsFile   | Found your local settings file.                                                 |
| checkLocalDrushFile      | Found your local drush settings file.                                           |
| checkUri                 | $options['uri'] is set.                                                         |
| checkUriResponse         | Received a response from site http://local.<project>.com.                           |
| checkFileSystem:%files   | Public files directory is writable.                                             |
| checkFileSystem:%private | Private files directory does not exist.                                         |
|                          |                                                                                 |
|                          | Create /var/www/<project>/files-private.                                            |
|                          | Installing Drupal will create this directory for you.                           |
|                          | Run `blt setup:drupal:install` to install Drupal, or run `blt setup` to run the |
|                          | entire setup process.                                                           |
|                          | Otherwise, run `mkdir -p /var/www/<project>/files-private`.                         |
|                          |                                                                                 |
| checkFileSystem:%temp    | Temporary files directory is writable.                                          |
| checkDbConnection        | Connected to database.                                                          |
| checkDrupalBootstrapped  | Bootstrapped Drupal via drush.                                                  |
| checkDrupalInstalled     | Drupal is installed.                                                            |
| checkCaching:page        | Drupal cache is disabled.                                                       |
| checkCaching:css         | CSS preprocessing is disabled.                                                  |
| checkCaching:js          | JS preprocessing is disabled.                                                   |
| checkCiConfig            | Git remotes are set in project.yml.                                             |
| checkComposer:require    | acquia/blt is in composer.json's require object.                                |
| checkComposer:plugins    | hirak/prestissimo plugin for composer is installed.                             |
| checkBehat:exists        | Behat local settings file exists.                                               |
| checkProjectYml:keys     | project.yml has no deprecated keys.                                             |
| checkAcsfConfig          | BLT settings are not included in your pre-settings-php include.                 |
|                          |   Add a require statement for "/../vendor/acquia/blt/settings/blt.settings.php" |
|                          | to /var/www/<project>/docroot/../factory-hooks/pre-settings-php/includes.php        |
| checkPhpDateTimezone     | PHP setting for date.timezone is correctly set                                  |
+--------------------------+---------------------------------------------------------------------------------+

When I run this command:

blt drupal:install

I get the following output:

[error]  MySql is not available. Please run `blt doctor` to diagnose the issue. 

And I expected this to happen:

@mikemadison13
Copy link
Contributor Author

seems to be related to #1448

@grasmash grasmash added the Bug Something isn't working label May 26, 2017
@grasmash
Copy link
Contributor

I'm not able to reproduce this. Can you test against latest 8.x?

@grasmash
Copy link
Contributor

@mikemadison13 I cannot reproduce. Please re-open if the problem persists. 8.x is moving fast and the issue is very likely resolved.

@mikemadison13
Copy link
Contributor Author

@grasmash i just updated to the most current dev and this is still happening for me.

blt setup:all
Setting up local environment for site 'default'...
> setup:build
>> setup:behat
Generating Behat configuration files...
>> setup:composer:install
Gathering patches for root package.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
>> setup:git-hooks
Installing pre-commit git hook...
Installing commit-msg git hook...
>> setup:settings
Executing post-setup-build target hook...
[ExecStack] echo 'No post-setup-build hook configured.'
No post-setup-build hook configured.
> setup:hash-salt
Hash salt already exists.
> setup:drupal:install
[error]  MySql is not available. Please run `blt doctor` to diagnose the issue. 
blt doctor
Drupal VM was detected. Running blt doctor inside of VM...
Executing command cd /var/www/<project> && /var/www/<project>/vendor/bin/drush cc drush && /var/www/<project>/vendor/bin/drush --include=/var/www/<project>/vendor/acquia/blt/drush blt-doctor -r /var/www/<project>/docroot inside of Drupal VM...
'drush' cache was cleared.                                                                                                                             [success]
Changed current directory to /home/vagrant/.composer
+----------------------+--------------------------------------------------------------------------------+
| Property             | Value                                                                          |
+----------------------+--------------------------------------------------------------------------------+
| %paths               |                                                                                |
|  - %root             | /var/www/<project>/docroot                                                         |
|  - %site             | sites/default                                                                  |
|  - %modules          | modules                                                                        |
|  - %themes           | themes                                                                         |
|  - %config-sync      | /var/www/<project>/config/default                                                  |
|  - %files            | sites/default/files                                                            |
|  - %private          | /var/www/<project>/files-private                                                   |
|  - %temp             | /tmp                                                                           |
| admin-theme          | seven                                                                          |
| blt-version          | 8.x-dev                                                                        |
| bootstrap            | Successful                                                                     |
| config-sync          | /var/www/<project>/config/default                                                  |
| db-driver            | mysql                                                                          |
| db-hostname          | localhost                                                                      |
| db-name              | drupal                                                                         |
| db-password          | drupal                                                                         |
| db-port              | 3306                                                                           |
| db-status            | Connected                                                                      |
| db-username          | drupal                                                                         |
| drupal-settings-file | sites/default/settings.php                                                     |
| drupal-version       | 8.3.2                                                                          |
| drush-alias-files    | /var/www/<project>/docroot/../drush/site-aliases/aliases.drushrc.php               |
|                      | /var/www/<project>/docroot/../drush/site-aliases/example.acsf.aliases.drushrc.php  |
|                      | /var/www/<project>/docroot/../drush/site-aliases/example.local.aliases.drushrc.php |
|                      | /var/www/<project>/docroot/../drush/site-aliases/mtav2.aliases.drushrc.php         |
| drush-conf           | /var/www/<project>/drush/drushrc.php                                               |
| drush-script         | /var/www/<project>/vendor/drush/drush/drush.php                                    |
| drush-temp           | /tmp                                                                           |
| drush-version        | 8.1.11                                                                         |
| files                | sites/default/files                                                            |
| install-profile      | lightning                                                                      |
| local-drushrc        | /var/www/<project>/docroot/sites/default/local.drushrc.php                         |
| local-settings       | /var/www/<project>/docroot/sites/default/settings/local.settings.php               |
| modules              | modules                                                                        |
| php-bin              | /usr/bin/php                                                                   |
| php-conf             | /etc/php/5.6/cli/php.ini                                                       |
| php-os               | Linux                                                                          |
| private              | /var/www/<project>/files-private                                                   |
| root                 | /var/www/<project>/docroot                                                         |
| site                 | sites/default                                                                  |
| temp                 | /tmp                                                                           |
| theme                | <project>2                                                                         |
| themes               | themes                                                                         |
| uri                  | http://local.<project>.com                                                         |
| user                 |                                                                                |
+----------------------+--------------------------------------------------------------------------------+
+--------------------------+---------------------------------------------------------------------------------+
| Check                    | Outcome                                                                         |
+--------------------------+---------------------------------------------------------------------------------+
| checkDocrootExists       | Found docroot.                                                                  |
| checkCoreExists          | Drupal core exists                                                              |
| checkSettingsFile        | BLT settings are included in settings file.                                     |
| checkLocalSettingsFile   | Found your local settings file.                                                 |
| checkLocalDrushFile      | Found your local drush settings file.                                           |
| checkUri                 | $options['uri'] is set.                                                         |
| checkUriResponse         | Received a response from site http://local.<project>.com.                           |
| checkFileSystem:%files   | Public files directory is writable.                                             |
| checkFileSystem:%private | Private files directory does not exist.                                         |
|                          |                                                                                 |
|                          | Create /var/www/<project>/files-private.                                            |
|                          | Installing Drupal will create this directory for you.                           |
|                          | Run `blt setup:drupal:install` to install Drupal, or run `blt setup` to run the |
|                          | entire setup process.                                                           |
|                          | Otherwise, run `mkdir -p /var/www/<project>/files-private`.                         |
|                          |                                                                                 |
| checkFileSystem:%temp    | Temporary files directory is writable.                                          |
| checkDbConnection        | Connected to database.                                                          |
| checkDrupalBootstrapped  | Bootstrapped Drupal via drush.                                                  |
| checkDrupalInstalled     | Drupal is installed.                                                            |
| checkCaching:page        | Drupal cache is disabled.                                                       |
| checkCaching:css         | CSS preprocessing is disabled.                                                  |
| checkCaching:js          | JS preprocessing is disabled.                                                   |
| checkCiConfig            | Git remotes are set in project.yml.                                             |
| checkComposer:require    | acquia/blt is in composer.json's require object.                                |
| checkComposer:plugins    | hirak/prestissimo plugin for composer is installed.                             |
| checkBehat:exists        | Behat local settings file exists.                                               |
| checkProjectYml:keys     | project.yml has no deprecated keys.                                             |
| checkAcsfConfig          | BLT settings are not included in your pre-settings-php include.                 |
|                          |   Add a require statement for "/../vendor/acquia/blt/settings/blt.settings.php" |
|                          | to /var/www/<project>/docroot/../factory-hooks/pre-settings-php/includes.php        |
| checkPhpDateTimezone     | PHP setting for date.timezone is correctly set                                  |
+--------------------------+---------------------------------------------------------------------------------+

@shailen-jsa
Copy link

Hi, I am also getting same error, [error] MySql is not available. Please run blt doctor to diagnose the issue
I have tried changing aliases as well - No luck.

Can somebody tell me if there is any other alternative way to complete the process?

https://github.com/Drupal4Gov/Drupal-GovCon-2017/blob/master/drush/site-aliases/aliases.drushrc.php

Thanks.

@mikemadison13
Copy link
Contributor Author

mikemadison13 commented Jan 12, 2018

@shailen-jsa i would suggest that you open a new issue with the output of your BLT doctor and more specific information about your local. I've been able to resolve the above issue by updating to the most current version of BLT. Make sure to reference this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants