mm wrote:
I have a question. Can I read a local wikpedia
database using only mtsql?
Can somebody help me?
How can I do this?
Thanks,
Mircea
Yes, indeed you can. It's easiest to access the cur_table (the current
version of articles, not the history).
Get a Wikipedia cur_table dump, install mysql, tweak its config
parameters a bit so it can read the very large chunks the DB dump is
written in, and execute the dump as a set of mysql commands. This will
build and populate a copy of the database, which you can then directly
read using SQL commands to mysql.
A lot of the structure of the database is self-evident, but you will
need a bit of advice to get the finer details of all the information in
the dump. Backup dumps contain compressed data, and are harder, but not
at all impossible, to access.
The same goes for accessing live data from your own local Wikipedia
installation's database, if you have one.
-- Neil
Dear Neil,
Thanks a lot and please give me more info.
I am running Linus Fedora Core 3. Somebody tel me that I need some files
for every database.
For instance I have: db.frm, db.MYD, db.MIY in /var/lib/mysql/mysql.
I have 2 dumps (20050309_cur_table.sql, 20050309_old_table.sql) for
Romanian wikipedia on directory
/mnt/120GB/nou-01-24/MyD/01/Lucrari_Wikipedia/wikipedia-ro
I also have one English version couple of files and intend to read from
it eider.
Next I hope to write some C code to access info from database.
Thanks again,
Mircea