Thread:Project:Support desk/Is it possible to export database tables by prefix?/reply (4)

A couple of hints:

If you look at the LocalSettings.php for a wiki, find the setting for $wgDBprefix and then use the following command, substituting the value of $wgDBprefix for PREFIX:

echo "show tables like 'PREFIX%'" | mysql wikidb -u root | tail -n +2 > tables.txt

Then you can use mysqldump to create a dump file of that wiki's database tables:

cat tables.txt | xargs mysqldump wikidb > dump.sql

Use the dump file to create a database on the new server:

mysql newWikidb < dump.sql