DivanteLtd / anonymizer

Universal tool to anonymize database. GDPR (General Data Protection Regulation) data protection act supporting tool.
https://www.linkedin.com/pulse/gdpr-quick-wins-software-developers-teams-piotr-karwatka
348 stars 59 forks source link

Sequel::DatabaseError: Mysql2::Error: Table 'test.customer_entity' doesn't exist #50

Open arahmancsd opened 4 years ago

arahmancsd commented 4 years ago

I am trying to implement mysql anonymizer, but I am getting above error. I have created a test database in mysql and dumped the gz file in the /usr/src/anonymizer/data/test.sql.gz The database has a table emp with a single column. created the test.json file in config/test.json with followings;

{
  "type": "extended",
  "basic_type": "magento_1_9",
  "dump_server": {
    "host": "",
    "port": "",
    "user": "",
    "path": "/usr/src/anonymizer/data/"
  },
  "tables": {
    "emp": {
      "name": {
        "type": "firstname",
        "action": "update"
      }
    }
  }
}

added local.yml file in config/env

logger:
  enabled: false
dump_server:
web_server:
database:
  user: anonymizer
  host: ruby25_mysql_1
  pass: pass
tmp_path: /tmp

backed up the test database using sqldump in anonymizer/data/test.sql.gz. I am running below command to anonymize the database, but it throws an error. RUBY_ENV=local bundle exec rake project:anonymize[test] --trace

Error

** Invoke project:anonymize (first_time)
** Execute project:anonymize
** Invoke project:copy_dump_from_remote (first_time)
** Execute project:copy_dump_from_remote
** Invoke project:remove_database (first_time)
** Execute project:remove_database
** Invoke project:restore_database (first_time)
** Execute project:restore_database
** Invoke project:anonymize_database (first_time)
** Execute project:anonymize_database
rake aborted!
Sequel::DatabaseError: Mysql2::Error: Table 'test.customer_entity' doesn't exist
/usr/src/anonymizer/vendor/bundle/ruby/2.5.0/gems/mysql2-0.5.2/lib/mysql2/client.rb:131:in `_query'

I don't understand why it has to look for test.customer_entity table in the test database as I don't have the table in my database.

TheMlok commented 2 years ago

I have absolutely same issue