Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

nitro db import fails when the DB name contains a dash (escaping issue?) #212

Closed
benface opened this issue Sep 16, 2020 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@benface
Copy link

benface commented Sep 16, 2020

Description

When entering a DB name with a dash after Nitro asks to "Enter the database name to create for the import" (e.g. site-dev), it throws an error:

Importing a compressed DB backup (.sql.zip) as generated by Craft results in an error:

Uploading "site-dev.sql" into "nitro-dev" (large files may take a while)...
mysql: [Warning] Using a password on the command line interface can be insecure.
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 '-dev' at line 1

Error: exit status 1

Additional info

  • Nitro version: 1.0.1
  • Multipass version: 1.4.0+mac
@benface benface added the bug Something isn't working label Sep 16, 2020
@jasonmccallister jasonmccallister self-assigned this Sep 22, 2020
@jasonmccallister
Copy link
Contributor

@benface this is definitely caused by an escaping issue. I'm preparing a release that moves the database import into the gRPC API that makes the import faster and should resolve this issue. We are also going to add a "slug" feature to db add to help prevent this. Bottom line, more of these features are going to be moved to the API going forward.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants