This forum is no longer active. Please post your questions to our new community site

Forums MediaWiki

Importing existing mediawiki data

Subscribe to Importing existing mediawiki data 4 post(s), 2 voice(s)

 
Avatar mikegdb 4 post(s)

Hi

I have installed the mediawiki stack and would like to import a dump of my existing database. I’m running the following command:

$ mysql —verbose -u user -ppassword bitnami_mediawiki < dump.sql

This will run until it encounters an ERROR 1062 duplicate entry error.

Is there anyway to overcome this? I simply want to overwrite everything in the bitnami_mediawiki database with the data from my current database.

Thanks.

Mike

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

Try with the following options:

-f —line-numbers

So the database will be imported and it will print the errors.

 
Avatar mikegdb 4 post(s)

Hi Beltrán

Thank you. The method I ended up using was to change the export type for exporting the original data within phpmyadmin. Instead of INSERT I selected REPLACE. This allowed me to effectively overwrite everything.

Mike

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

I’m glad to hear that. Thanks for posting your solution.

Forums MediaWiki