Replibyte icon indicating copy to clipboard operation
Replibyte copied to clipboard

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

Open jessebye opened this issue 3 years ago • 2 comments

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:[email protected]: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

jessebye avatar Oct 12 '22 22:10 jessebye

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?

evoxmusic avatar Oct 14 '22 05:10 evoxmusic

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:[email protected]:3306/test
  transformers:
    - database: test
      table: area_codes
      columns:
        - name: city
          transformer_name: redacted
datastore:
  local_disk:
    dir: ./data
destination:
  connection_uri: mysql://root:[email protected]:3306/test

jessebye avatar Oct 19 '22 16:10 jessebye