# phpbb3.1 import database to Discourse : error in your SQL syntax

**URL:** <https://meta.discourse.org/t/phpbb3-1-import-database-to-discourse-error-in-your-sql-syntax/43852>\
**Category:** Bug\
**Created:** [May 7, 2016, 4:38pm UTC](https://meta.discourse.org/t/phpbb3-1-import-database-to-discourse-error-in-your-sql-syntax/43852 "2016-05-07T16:38:12Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Chopper](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chopper/32/57073_2.png) [@Chopper](https://meta.discourse.org/u/Chopper)\
**Post date:** [May 7, 2016, 4:38pm UTC](https://meta.discourse.org/t/phpbb3-1-import-database-to-discourse-error-in-your-sql-syntax/43852/1 "2016-05-07T16:38:13Z")

</div>

Following this tutorial : [Migrate a phpBB3 forum to Discourse](https://meta.discourse.org/t/importing-from-phpbb3/30810)

I get the error : `You have an error in your SQL syntax`

I follow the steps **Importing using Docker** , let default option on the script ` setting.yml` and put my database from phpbb on the folder `/var/discourse/shared/standalone/import/data/phpbb_mysql.sql`

When lauching : `import_phpbb3.sh` I get this error when i launch the script `import_phpbb3.sh`

```
Loading database dump into MySQL...
The phpBB3 import is starting...

loading existing groups...
loading existing users...
loading existing categories...
loading existing posts...
loading existing topics...

importing from phpBB 3.1.5

creating users
      230 / 230 (100.0%) /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/mysql2-0.4.4/lib/mysql2/client.rb:107:in `_query': You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND u.user_type != 2 (Mysql2::Error)
        ORDER BY u.user_id ASC
        LIMIT 1000' at line 16
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/mysql2-0.4.4/lib/mysql2/client.rb:107:in `block in query'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/mysql2-0.4.4/lib/mysql2/client.rb:106:in `handle_interrupt'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/mysql2-0.4.4/lib/mysql2/client.rb:106:in `query'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-mini-profiler-0.9.9.2/lib/patches/db/mysql2.rb:20:in `query'
        from /var/www/discourse/script/import_scripts/phpbb3/database/database_base.rb:16:in `query'
        from /var/www/discourse/script/import_scripts/phpbb3/database/database_3_1.rb:7:in `fetch_users'
        from /var/www/discourse/script/import_scripts/phpbb3/importer.rb:63:in `block in import_users'
        from /var/www/discourse/script/import_scripts/base.rb:702:in `block in batches'
        from /var/www/discourse/script/import_scripts/base.rb:701:in `loop'
        from /var/www/discourse/script/import_scripts/base.rb:701:in `batches'
        from /var/www/discourse/script/import_scripts/phpbb3/importer.rb:169:in `batches'
        from /var/www/discourse/script/import_scripts/phpbb3/importer.rb:62:in `import_users'
        from /var/www/discourse/script/import_scripts/phpbb3/importer.rb:28:in `execute'
        from /var/www/discourse/script/import_scripts/base.rb:45:in `perform'
        from /var/www/discourse/script/import_scripts/phpbb3/importer.rb:20:in `perform'
        from script/import_scripts/phpbb3.rb:31:in `<module:PhpBB3>'
        from script/import_scripts/phpbb3.rb:12:in `<module:ImportScripts>'
        from script/import_scripts/phpbb3.rb:11:in `<main>'

```

---

_[View the full topic](https://meta.discourse.org/t/phpbb3-1-import-database-to-discourse-error-in-your-sql-syntax/43852)._
