Qovery / Replibyte

Seed your development database with real data ⚡️
https://www.replibyte.com
GNU General Public License v3.0
4.17k stars 129 forks source link

Error 1046 "No database selected" error when attempting dump restore #228

Open jessebye opened 2 years ago

jessebye commented 2 years ago

When attempting to restore a dump with replibyte -c conf.yaml dump restore local -v latest -i mysql, we receive this error:

mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1046 (3D000) at line 1: No database selected
command error: "exit status: 1"

Here is our config file:

source:
  connection_uri: mysql://root:foobar@127.0.0.1:3306/test
  database_subset:
    database: test
    table: allocations
    strategy_name: random
    strategy_options:
      percent: 10
  transformers:
    - database: test
      table: area_codes
      columns:
        - name: city
          transformer_name: random
datastore:
  local_disk:
    dir: ./data
evoxmusic commented 2 years ago

Hi @jessebye , unfortunately the MySQL sunsetting option is not available at the moment. I need more time to refactor the current codebase and provide the MySQL sunsetting feature. Any contribution is appreciated :)

Can you try without the sunsetting options?

jessebye commented 2 years ago

Hi @evoxmusic, I modified my config to remove the subsetting options, but still receive the same error. Here is my latest config which still exhibits the error:

source:
  connection_uri: mysql://root:foobar@127.0.0.1:3306/test
  transformers:
    - database: test
      table: area_codes
      columns:
        - name: city
          transformer_name: redacted
datastore:
  local_disk:
    dir: ./data
destination:
  connection_uri: mysql://root:foobar@127.0.0.1:3306/test