drupal icon indicating copy to clipboard operation
drupal copied to clipboard

lando with drupal 10

Open kamalkech opened this issue 1 year ago • 4 comments

  • 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?```

kamalkech avatar Nov 22 '24 13:11 kamalkech

any help here ?

kamalkech avatar Nov 22 '24 15:11 kamalkech

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

reynoldsalec avatar Nov 22 '24 17:11 reynoldsalec

@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)

kamalkech avatar Nov 23 '24 13:11 kamalkech

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

AaronFeledy avatar Nov 23 '24 23:11 AaronFeledy