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
I am trying to run a multi-site on Lando using a single database service. To date, we have used Lando's recommended approach of creating a separate database service for each of the sites, but with 21 sites and growing, this is causing performance issues. I would like to see if running a single database service, with multiple databases within it would offer better performance.
Lando's db-import documentation examples mention importing into an "auxiliary" database, but this does not seem to work. Is this supported? Could it be?
# Import a file into an auxiliary second database called 'db2'
# with a db called `dataz`
lando db-import dump.zip --host db2
The text was updated successfully, but these errors were encountered:
Hi @millnut! That would be for importing to the default database on a second db2 service, but I am trying to import to a second (and third, fourth) database on the default database (mariadb) service.
Ah I understand so a single service with multiple databases; I don't think you can do it out of the box but may be able to achieve it with a run step?
services:
database:
type: mariadbcreds:
user: mariadbpassword: mariadbdatabase: databaserun:
# Creates the extra databases as root since the app user does not have those privileges
- mysql -uroot -e "CREATE DATABASE IF NOT EXISTS db1; GRANT ALL PRIVILEGES ON db1.* TO 'mariadb'@'%' IDENTIFIED by 'mariadb';"
- mysql -uroot -e "CREATE DATABASE IF NOT EXISTS db2; GRANT ALL PRIVILEGES ON db2.* TO 'mariadb'@'%' IDENTIFIED by 'mariadb';"
- mysql -uroot -e "CREATE DATABASE IF NOT EXISTS db3; GRANT ALL PRIVILEGES ON db3.* TO 'mariadb'@'%' IDENTIFIED by 'mariadb';"
Apologies for the confusing title!
I am trying to run a multi-site on Lando using a single database service. To date, we have used Lando's recommended approach of creating a separate database service for each of the sites, but with 21 sites and growing, this is causing performance issues. I would like to see if running a single database service, with multiple databases within it would offer better performance.
Lando's db-import documentation examples mention importing into an "auxiliary" database, but this does not seem to work. Is this supported? Could it be?
The text was updated successfully, but these errors were encountered: