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

Unknown MySQL server host 'database' #5

Open
djhanus opened this issue Jun 29, 2022 · 0 comments
Open

Unknown MySQL server host 'database' #5

djhanus opened this issue Jun 29, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@djhanus
Copy link

djhanus commented Jun 29, 2022

I started up the lando container and tried to pull down a client site database but it didn't work and delivered an error. I had to run lando rebuild and then trying the same lando dep db:pull production command pulled down the database without any issue.

[localhost] > ./vendor/bin/wp db import db_backups/220629141222.sql
[localhost] < Error: Failed to get current SQL modes. Reason: ERROR 2005 (HY000): Unknown MySQL server host 'database' (-2)

In Process.php line 250:
                                                                                                                 
  [Symfony\Component\Process\Exception\ProcessFailedException]                                                   
  The command "./vendor/bin/wp db import db_backups/220629141222.sql" failed.                                    
                                                                                                                 
  Exit Code: 1(General error)                                                                                    
                                                                                                                 
  Working directory: /app                                                                                        
                                                                                                                 
  Output:                                                                                                        
  ================                                                                                               
                                                                                                                 
                                                                                                                 
  Error Output:                                                                                                  
  ================                                                                                               
  Error: Failed to get current SQL modes. Reason: ERROR 2005 (HY000): Unknown MySQL server host 'database' (-2)  
                                                                                                                 

Exception trace:
  at phar:///app/vendor/deployer/dist/dep/vendor/symfony/process/Process.php:250
 Symfony\Component\Process\Process->mustRun() at phar:///app/vendor/deployer/dist/dep/src/Utility/ProcessRunner.php:56
 Deployer\Utility\ProcessRunner->run() at phar:///app/vendor/deployer/dist/dep/src/functions.php:329
 Deployer\runLocally() at /app/vendor/itsahappymedium/wp-deployer/wp-deployer.php:174
 WP_Deployer->{closure}() at n/a:n/a
 call_user_func() at phar:///app/vendor/deployer/dist/dep/src/Task/Task.php:105
 Deployer\Task\Task->run() at phar:///app/vendor/deployer/dist/dep/src/Executor/SeriesExecutor.php:60
 Deployer\Executor\SeriesExecutor->run() at phar:///app/vendor/deployer/dist/dep/src/Console/TaskCommand.php:144
 Deployer\Console\TaskCommand->execute() at phar:///app/vendor/deployer/dist/dep/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at phar:///app/vendor/deployer/dist/dep/vendor/symfony/console/Application.php:924
 Symfony\Component\Console\Application->doRunCommand() at phar:///app/vendor/deployer/dist/dep/src/Console/Application.php:133
 Deployer\Console\Application->doRunCommand() at phar:///app/vendor/deployer/dist/dep/vendor/symfony/console/Application.php:265
 Symfony\Component\Console\Application->doRun() at phar:///app/vendor/deployer/dist/dep/vendor/symfony/console/Application.php:141
 Symfony\Component\Console\Application->run() at phar:///app/vendor/deployer/dist/dep/src/Deployer.php:326
 Deployer\Deployer::run() at phar:///app/vendor/deployer/dist/dep/bin/dep:136
 require() at /app/vendor/deployer/dist/dep:4
 include() at /app/vendor/bin/dep:117
@kodie kodie added the bug Something isn't working label Jun 29, 2022
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

2 participants