Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki

Problem loading wikipedia xml data to database using mwdumper

 

 

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded


ndkhanh824 at gmail

May 24, 2012, 3:01 PM

Post #1 of 4 (479 views)
Permalink
Problem loading wikipedia xml data to database using mwdumper

Hi all,
I'm loading compressed wikipedia xml data into mysql database using
mwdumper. The input is the following file gotten from
http://dumps.wikimedia.org/enwiki/latest/:

enwiki-latest-pages-meta-history1.xml-p000000010p000002130.bz2

In mysql, I have a user named wikiuser and have an empty database for that
user named wikidb.
I run the following command to load data into my db:

java -jar mwdumper.jar --format=sql:1.5 [the_bz2_file_name] |
mysql -u wikiuser -p wikidb

However, I got this error: "ERROR 1146 (42S02) at line 33: Table
'wikidb.text' doesn't exist".
You can see the detail output messages from the link below:
http://pastebin.com/Y6WXhxnq

Can someone help me fix this error please?

Many thanks,
Chepukha
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


brion at pobox

May 24, 2012, 3:05 PM

Post #2 of 4 (450 views)
Permalink
Re: Problem loading wikipedia xml data to database using mwdumper [In reply to]

On Thu, May 24, 2012 at 3:01 PM, Khanh Nguyen <ndkhanh824 [at] gmail> wrote:

> However, I got this error: "ERROR 1146 (42S02) at line 33: Table
> 'wikidb.text' doesn't exist".
> You can see the detail output messages from the link below:
> http://pastebin.com/Y6WXhxnq
>

mwdumper's conversion to SQL doesn't actually create the tables for you, it
just inserts data into them assuming they already exist.

You can grab maintenance/tables.sql from a MediaWiki download and source
that into your database first to create the empty tables.

-- brion
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


ndkhanh824 at gmail

May 24, 2012, 3:19 PM

Post #3 of 4 (452 views)
Permalink
Re: Problem loading wikipedia xml data to database using mwdumper [In reply to]

Thank you very much Brion. That fixes my problem.

On Thu, May 24, 2012 at 6:05 PM, Brion Vibber <brion [at] pobox> wrote:

> On Thu, May 24, 2012 at 3:01 PM, Khanh Nguyen <ndkhanh824 [at] gmail>
> wrote:
>
> > However, I got this error: "ERROR 1146 (42S02) at line 33: Table
> > 'wikidb.text' doesn't exist".
> > You can see the detail output messages from the link below:
> > http://pastebin.com/Y6WXhxnq
> >
>
> mwdumper's conversion to SQL doesn't actually create the tables for you, it
> just inserts data into them assuming they already exist.
>
> You can grab maintenance/tables.sql from a MediaWiki download and source
> that into your database first to create the empty tables.
>
> -- brion
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l [at] lists
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


ndkhanh824 at gmail

May 24, 2012, 3:30 PM

Post #4 of 4 (454 views)
Permalink
Re: Problem loading wikipedia xml data to database using mwdumper [In reply to]

I got this error in the middle of the process:
ERROR 1064 (42000) at line 1803: 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 ''{{pp-move-indef}}\n{{Anarchism
sidebar}}\n\'\'\'Anarchism\'\'\' is a [[politica' at line 1

I got the tables.sql file from here (
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/tables.sql?view=markup)
and it does not even have more than 1500 lines so I'm not sure what the
line number above refer to.

Again, here's the full output message if someone needs it:
http://pastebin.com/BEtGTEAA
Also, I have seen some data in my wikidb.

Thanks,

On Thu, May 24, 2012 at 6:19 PM, Khanh Nguyen <ndkhanh824 [at] gmail> wrote:

> Thank you very much Brion. That fixes my problem.
>
>
> On Thu, May 24, 2012 at 6:05 PM, Brion Vibber <brion [at] pobox> wrote:
>
>> On Thu, May 24, 2012 at 3:01 PM, Khanh Nguyen <ndkhanh824 [at] gmail>
>> wrote:
>>
>> > However, I got this error: "ERROR 1146 (42S02) at line 33: Table
>> > 'wikidb.text' doesn't exist".
>> > You can see the detail output messages from the link below:
>> > http://pastebin.com/Y6WXhxnq
>> >
>>
>> mwdumper's conversion to SQL doesn't actually create the tables for you,
>> it
>> just inserts data into them assuming they already exist.
>>
>> You can grab maintenance/tables.sql from a MediaWiki download and source
>> that into your database first to create the empty tables.
>>
>> -- brion
>> _______________________________________________
>> MediaWiki-l mailing list
>> MediaWiki-l [at] lists
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
>
>
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.