Comments (2)
Had the exact same issue
Here's how I solved it,
Problem
I think the default username, password and db-name for connecting to the database has changed somehow. So when pulling from acquia, it was not able to connect to the database
Solution
Get the correct info from lando and update it in .lando.yml. Since the new database doesn't exists, we have to manually create it
Steps
I ran this command to get the info
lando info
Got back (username, password, db-name might be different for you)
creds: { database: <db-name>, password: <password>, user: <username> }
Then, get into DB docker container and create the database
lando mysql
create database <db-name>
In .lando.yml, add the credentials
services:
database:
portforward: true
creds:
user: '<username>'
password: '<password>'
database: '<db-name>'
once the configuration is updated, destroy lando and start it again. when db creds are changed, we have to do lando destroy and start it as mentioned here
lando destroy -y && lando start
from lando.
I ran into this because I had overridden the database creds in .lando.yml to something other than "acquia". Apparently the only way lando pull
works with the Acquia recipe is if the database creds in .lando.yml are:
services:
database:
creds:
user: acquia
password: acquia
database: acquia
Also in your Drupal settings.php or settings.local.php:
/**
* When using Lando, use Lando settings.
* Prepare a LANDO_INFO constant.
* See: https://jigarius.com/blog/drupal-with-lando
*/
$info = getenv('LANDO_INFO');
if ($info) {
define('LANDO_INFO', json_decode($info, TRUE));
}
// Configure database for Lando.
if (defined('LANDO_INFO')) {
if (!isset($databases))
$databases = array();
$databases['default']['default'] = [
'driver' => 'mysql',
'database' => LANDO_INFO['database']['creds']['database'],
'username' => LANDO_INFO['database']['creds']['user'],
'password' => LANDO_INFO['database']['creds']['password'],
'host' => LANDO_INFO['database']['internal_connection']['host'],
'port' => LANDO_INFO['database']['internal_connection']['port'],
'prefix' => '',
];
}
from lando.
Related Issues (20)
- Update to version 3.20.7 breaks recipies HOT 8
- can't reach a node service through proxy (502 bad gateway)
- Cross-project communication broken on Fedora 39, Docker Engine 24. HOT 2
- events.lndo.site does not point to localhost. HOT 2
- Cli Error in red HOT 1
- Certificates created locally don't use `subjectAltName` for setting the `DNS` and fail to authenticate when running BrowserSync HOT 2
- tooling in ubuntu fails due to adding tooling name to docker command
- After upgrading from 3.18.0 to 3.20.8 my custom tooling wtih options stopped working
- Enable GitHub Discussions for the lando/lando project
- Change default domain suffix from ".lndo.site" to ".lando" HOT 1
- Lando/Mysql8/Linux fail HOT 1
- Update available notice on Beta HOT 2
- "Lando cannot write to /usr/local/bin" when running `lando update` HOT 4
- "Need to give this composition a project name" (`lando init`) HOT 11
- Error Lando cannot write to /usr/share/lando/bin! HOT 1
- Provide a way to get `LANDO_APP_PROJECT` via host lando cli command.
- v3.21.0-beta.1 should not be marked as stable HOT 15
- reconnect to logs and ssh after lando restart
- Cannot launch x64-3.21.0-beta9.exe installer HOT 1
- Appserver URLs: name using subdomain doesn't work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lando.