lando / mysql

The Official MySQL Lando Plugin
https://docs.lando.dev/mysql/
GNU General Public License v3.0
1 stars 2 forks source link

Database healthcheck throws warning #51

Open yorkshire-pudding opened 2 months ago

yorkshire-pudding commented 2 months ago

I have a Lando recipe and GitHub action that runs tests. I've just updated it to use the lando/setup-lando@v3 gha (which works a treat btw)

Recipe: Backdrop Lando version: "latest" Database: mysql

When Lando is started, it mostly runs fine, but when it does the database health check this warning appears: Warning: LED] mysql: [Warning] Using a password on the command line interface can be insecure.

I wonder if the healthcheck could switch to using a .cnf file for the creds to avoid this warning?

I'm also getting a failed healthcheck locally for the same reason even though the database works otherwise.

yorkshire-pudding commented 1 month ago

What I've done to avoid this: in my .lando.yml file, override the health check, thus:

services:  
  database:
    healthcheck: mysql --defaults-extra-file=/app/.lando/mysql.cnf --silent --execute "SHOW DATABASES;"

and create in /app/.lando/mysql.cnf

[client]
  user=backdrop
  password=backdrop
  host=database