I had a small wiki I had hosted on a free host, but it seems it got spammed and the host took it down. They passed me a .sql
file which was 2GB large. I am looking to set up another wiki, load the .sql
into it and clean up the mess (or find the good stuff and copy it out).
I set up a new mediawiki, then I did the following:
mysql -u <user> -h mysql.domain.com -p<password> -e "drop database <dbname>;"
mysql -u <user> -h mysql.domain.com -p<password> -e "create database <dbname>;"
mysql -u <user> -h mysql.domain.com -p<password> <dbname> < file.sql
It takes a long time but I get no errors, then when I visit the mediawiki url I see:
A database query error has occurred. This may indicate a bug in the software.
Is this the wrong way to do this? What is the easiest way I can do this correctly?
Edit:
Now seeing:
A database query error has occurred. This may indicate a bug in the software.
Query:
SELECT page_id,page_namespace,page_title,page_restrictions,page_counter,page_is_redirect,page_is_new,page_random,page_touched,page_latest,page_len,page_content_model FROM `page` WHERE page_namespace = '0' AND page_title = 'Main_Page' LIMIT 1
Function: WikiPage::pageData
Error: 1054 Unknown column 'page_content_model' in 'field list' (mysql.domain.com)
php maintenance/update.php
on the new MediaWiki installation?$wgShowSQLErrors = true;
to your LocalSettings.php, so that you'll see what actually goes wrong. See also How to debug SQL errors in the MediaWiki manual.