Skip to content
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

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

Open
arahmancsd opened this issue Mar 18, 2020 · 1 comment

Comments

@arahmancsd
Copy link

arahmancsd commented Mar 18, 2020

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
Copy link

TheMlok commented Nov 2, 2021

I have absolutely same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants