# Error when importing from Vanilla

**URL:** https://meta.discourse.org/t/error-when-importing-from-vanilla/33716
**Category:** Migration
**Created:** [24 september 2015 om 18:16 UTC](https://meta.discourse.org/t/error-when-importing-from-vanilla/33716 "2015-09-24T18:16:59Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![huulbaek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/huulbaek/32/46692_2.png) [@huulbaek](https://meta.discourse.org/u/huulbaek)
#### Post date: [25 september 2015 om 12:03 UTC](https://meta.discourse.org/t/error-when-importing-from-vanilla/33716/3 "2015-09-25T12:03:04Z")

</div>

I accept that answer 😄

This is what I ended up doing should someone else get themselves in the same situation (I doubt that!):

1. Make copy of MySQL database.
2. Convert database copy and tables to UTF-8 if necessary.
3. Export to CSV via Vanilla Porter - requires some small changes in the source to support older ExpressionEngine versions.
4. Install Vanilla and import CSV into new database.
5. Use `vanilla_mysql.rb` to import from this database - either remotely or locally.

@riking: Regarding that last step I had to make minor correction because users is not defined in

```ruby
   next if all_records_exist? :users, users.map {|u| u['UserID'].to_i}

```

Not making any PR’s because I know nothing about Ruby.

---

_[View the full topic](https://meta.discourse.org/t/error-when-importing-from-vanilla/33716)._
