anlek / mongify

Mongify allows you to map your data from a sql database and into a mongodb document database.
http://github.com/anlek/mongify
MIT License
317 stars 82 forks source link

Failed to create index issue #154

Closed robertangeles closed 6 years ago

robertangeles commented 6 years ago

Hi to all.

I was wondering if any of you guys are familiar with this error when processing a translation file.

robertangeles@c0363:~/DataMigration$ mongify process database.config properties.rb /home/robertangeles/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/mongo-1.12.5/lib/mongo/collection.rb:1165:in `rescue in generate_indexes': Failed to create index {:name=>"pre_mongified_id_1", :key=>{"pre_mongified_id"=>1}} with the following error: Database command 'createIndexes' failed: not authorized on agentplusdev to execute command { createIndexes: "properties", indexes: [ { name: "pre_mongified_id_1", key: { pre_mongified_id: 1 } } ] } (Mongo::OperationFailure)

I'm running Ubuntu 16.04 LTS with mongoDB 3.2.

Just a simple translation

table "mdb_properties", :rename_to => 'properties' do column "propId", :string column "propName", :string column "propStatus", :string column "propSubStatus", :string end

Though I feel this is a permission issue, does it have to do with user created in the database? In the database.config file, how does mongify recognize which user to use?

Thanks!

Rob