You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
browse to local site, execute Drupal (Paragon distribution) setup --> creates the database "main"
platform db:dump --> creates a sql script to build a copy of production database
lando database main -e "source .sql" --> import into the database main
[perform some work]
[add tooling config to expose sql-export: see below]
lando db-export
ERROR:
Preparing to export database.2022-05-03-1651596318.sql from database 'database' on service 'db' as user root...
mysqldump: Got error: 1045: "Access denied for user 'root'@'localhost' (using password: NO)" when trying to connect
Failed to create file: database.2022-05-03-1651596318.sql
In the tooling config I had to change the name of the SERVICE from "database" to "db" as this was the service that the recipe (or the Drupal Setup routine) created.
The name of the DATABASE running in the "db" service is "main".
Is there an option to configure the name of the database used by the /helpers/sql-export.sh script uses? (If I edit the script directly, it is overwritten.)
I feel I'm missing something elementary.
Here is the tooling I added to my .lando.yml. Is there a config element to add here to specify database name?
name: XXXXXXXXXX
recipe: platformsh
config:
id: XXXXXXXXXXXX
tooling:
'db-export [file]':
service: :host
description: Exports database from a database service to a file
cmd: /helpers/sql-export.sh
user: root
database: main
options:
host:
description: The database service to use
default: db
alias:
- h
stdout:
description: Dump database to stdout
The text was updated successfully, but these errors were encountered:
My steps:
Preparing to export database.2022-05-03-1651596318.sql from database 'database' on service 'db' as user root...
mysqldump: Got error: 1045: "Access denied for user 'root'@'localhost' (using password: NO)" when trying to connect
Failed to create file: database.2022-05-03-1651596318.sql
In the tooling config I had to change the name of the SERVICE from "database" to "db" as this was the service that the recipe (or the Drupal Setup routine) created.
The name of the DATABASE running in the "db" service is "main".
Is there an option to configure the name of the database used by the /helpers/sql-export.sh script uses? (If I edit the script directly, it is overwritten.)
I feel I'm missing something elementary.
Here is the tooling I added to my .lando.yml. Is there a config element to add here to specify database name?
name: XXXXXXXXXX
recipe: platformsh
config:
id: XXXXXXXXXXXX
tooling:
'db-export [file]':
service: :host
description: Exports database from a database service to a file
cmd: /helpers/sql-export.sh
user: root
database: main
options:
host:
description: The database service to use
default: db
alias:
- h
stdout:
description: Dump database to stdout
The text was updated successfully, but these errors were encountered: