importing a text dump impossible due to slash comments

51 views Asked by At

i exported a phpbb3.2 forum with the vanilla2 forum exporter. i got a nice export.txt.gz extracted it, and tried to import the 40Mo file with the command line into my "test" database:

mysql -uroot -p test < export_forum_2016-12-31_054650.txt Enter password: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '// Export Started: 2016-12-31 05:46:50 Table: User UserID:int,LastIPAddress:varc' at line 1

but the interpreter bugs upon the "//" style of comments in the import text file, it does not understand it and blocks the import. exemple:

// Exported Table: Role (13 rows, 00:00.00)

how could i make it work?

-ubuntu 16.04 -mysql Ver 14.14 Distrib 5.7.16, for Linux (x86_64) using EditLine wrapper

1

There are 1 answers

0
Ty Kayn On BEST ANSWER

got the answer from the FAQ of the vanilla exporter, the file generated by the exporter is a .txt.gz we should not unzip it to make it work in the importer.

i tried to import the extracted .txt file, but the exporter does not plans to use it that way. you should use the "import" section of a fresh install of your vanilla 2 forum, upload your .gz file in the "uploads" folder of your forum, and use it in the admin import interface.