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

Following this tutorial : Importing from phpBB3

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>'
1 Like

Oops, my bad. I submitted a PR:
https://github.com/discourse/discourse/pull/4214

3 Likes