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

lando with drupal 10 #145

Open
kamalkech opened this issue Nov 22, 2024 · 4 comments
Open

lando with drupal 10 #145

kamalkech opened this issue Nov 22, 2024 · 4 comments

Comments

@kamalkech
Copy link

kamalkech commented Nov 22, 2024

  • Lando v3.23.3
  • Docker version 26.1.4, build 5650f9b
  • lando file:
name: d10-learn
recipe: drupal10
config:
  webroot: web
  via: nginx

in drupal settings i put:
username: drupal10
password: drupal10
host: database
port: 3306

lando info

    urls:
     [ 'http://d10-learn.lndo.site/',
       'https://d10-learn.lndo.site/',
       'https://localhost:50128',
       'http://localhost:50129' ],
    type: 'drupal-nginx',
    healthy: 'unknown',
    managed: true,
    webroot: 'web',
    config:
     { vhosts: '/Users/myuser/.lando/config/drupal10/default.conf.tpl',
       php: '/Users/myuser/.lando/config/drupal10/php.ini' },
    version: '1.25',
    meUser: 'www-data',
    hasCerts: true,
    api: 3,
    hostnames: [ 'appserver_nginx.d10learn.internal' ] },
  { service: 'appserver',
    urls: [],
    type: 'drupal-php',
    healthy: 'unknown',
    via: 'nginx',
    served_by: 'appserver_nginx',
    webroot: 'web',
    config:
     { php: '/Users/myuser/.lando/config/drupal10/php.ini',
       vhosts: '/Users/myuser/.lando/config/drupal10/default.conf.tpl' },
    version: '8.1',
    meUser: 'www-data',
    hasCerts: true,
    api: 3,
    hostnames: [ 'appserver.d10learn.internal' ],
    hostname: [] },
  { service: 'database',
    urls: [],
    type: 'drupal-mysql',
    healthy: 'unknown',
    internal_connection: { host: 'database', port: '3306' },
    external_connection: { host: '127.0.0.1', port: true },
    healthcheck:
     'mysql --host=database --user=drupal10 --database=drupal10 --password=drupal10 --silent --execute "SHOW TABLES;"',
    creds: { database: 'drupal10', password: 'drupal10', user: 'drupal10' },
    config: { database: '/Users/myuser/.lando/config/drupal10/mysql.cnf' },
    version: '5.7',
    meUser: 'www-data',
    hasCerts: false,
    api: 3,
    hostnames: [ 'database.d10learn.internal' ],
    hostname: [] } ]```

i get this issue:

Error message
Resolve all issues below to continue the installation. For help configuring your database server, see the installation handbook, or contact your hosting provider.

Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for database failed: Name or service not known [Tip: This message normally means that there is no MySQL server running on the system or that you are using an incorrect host name or port number when trying to connect to the server. You should also check that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.] .
    Is the database server running?
    Does the database exist or does the database user have sufficient privileges to create the database?
    Have you entered the correct database name?
    Have you entered the correct username and password?
    Have you entered the correct database hostname and port number?```
@rtfm-47 rtfm-47 transferred this issue from lando/lando Nov 22, 2024
@kamalkech
Copy link
Author

any help here ?

@reynoldsalec
Copy link
Member

@kamalkech if you run lando mysql --host=database --user=drupal10 --database=drupal10 --password=drupal10 does that log you in?

@kamalkech
Copy link
Author

kamalkech commented Nov 23, 2024

@reynoldsalec that's what i get

lando mysql --host=database --user=drupal10 --database=drupal10 --password=drupal10
Error response from daemon: No such container: d10learn_database_1
[+] Running 2/2
 ✔ database Pulled                                                                       16.6s
   ✔ c674f97e4e74 Pull complete                                                          14.3s
[+] Running 1/1
 ✔ Container d10learn_database_1  Started                                                 0.6s
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on 'database' (111)

@AaronFeledy
Copy link
Member

AaronFeledy commented Nov 23, 2024

That looks like Lando never built the environment. Try running lando rebuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants