-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Cannot import database to additional database service since upgrade to v3.21.0 #53
Comments
Just saw #52 So it seems like the issue is fixed for the database in the main container, but not when you have additional database containers: IssueI still have the issue, when I define multiple database containers (should not be Drupal-related as in the example): name: myproject
recipe: drupal10
config:
webroot: web
services:
additionaldb1:
type: mysql
portforward: true
additionaldb2:
type: mysql
portforward: true Now I have this: ~/apps/drupal10$ lando db-import initial.sql.gz --host additionaldb1
Preparing to import /app/initial.sql.gz into database 'database' on service 'additionaldb1' as user root...
Emptying database...
NOTE: See the --no-wipe flag to avoid this step!
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database' at line 1 Importing into the main database works though: ~/apps/drupal10$ lando db-import initial.sql.gz
Preparing to import /app/initial.sql.gz into database 'drupal10' on service 'database' as user root...
Emptying drupal10...
NOTE: See the --no-wipe flag to avoid this step!
Gzipped file detected!
Importing /app/initial.sql.gz...
Import complete! WorkaroundThe lando ssh --service=aditionaldb1
mysql -u root
drop database `database`;
create database `database`; and then VersionI am on ~/apps/drupal10$ lando version
v3.21.0 |
I'll try to replicate this, would you mind sharing your complete Landofile? Would be good to add a test for this in our recipe tests of the |
Hey, @reynoldsalec thanks for jumping in. The lando file from my comment is complete, you could use that. The database I am trying to import is one I take after an initial Drupal installation, but any dummy one would suffice, e.g. the one from here. |
Confirmed thaTI'm experiencing the same issue; it looks like recent changes to the I'm making a PR @drupov to address this and add test coverage, thanks for putting in the issue! |
...adding to this, I think the reason the script works otherwise is because The earlier version of the |
… tests. (#173) * lando/mysql#53: Address db-import error by quoting database name. Add tests. * lando/mysql#53: Update the tests with correct hostnames/envvars. * lando/mysql#53: Fix core test issue. Remove debugging code. * Update changelog.
...and just a note that this won't ACTUALLY be deployed until Lando v3.21.1 is released, which will probably be this Friday...just in case someone see this. |
This works now with v3.21.2 Thanks a lot |
… tests. (#173) * lando/mysql#53: Address db-import error by quoting database name. Add tests. * lando/mysql#53: Update the tests with correct hostnames/envvars. * lando/mysql#53: Fix core test issue. Remove debugging code. * Update changelog.
Importing into an additional database service seems to not be possible anymore, as emptying the database in question fails.
I have this Drupal 10 recipe, but it is not related to Drupal IMO:
lando db-import initial.sql.gz
works ok.lando db-import initial.sql.gz --host db2
fails though, seemingly when the command tries to empty the database:I can confirm, that
lando db-import initial.sql.gz --host db2 --no-wipe
works.The text was updated successfully, but these errors were encountered: