On 11/11/2010 12:25, Anastasia Dimou wrote:
On Thu, 2010-11-11 at 12:07 +0000, Markus Krötzsch
wrote:
On 11/11/2010 11:18, Anastasia Dimou wrote:
Hey everybody,
I was wondering whether I can have two discrete wikis (semantic wikis to
be more accurate) sharing the same database on the same server. My
intention is to launch a simpler copy of the existing wiki (so they are
going to have the same database scheme). I want both of them to be
up-to-date, namely, if someone edit the one, the changes should appear
on the other as well. Is this possible?
Hi Nata,
when installing MediaWiki with the MySQL backend, you are asked to
provide a prefix for DB tables. This can be left empty, but it can also
be some short string such as "mywiki" (or whatever). Wikis will put this
text in front of all database table names, thus allowing multiple sets
of MediaWiki tables to co-exist in the same database. This setting is
also honoured by SMW.
Changing this setting in an existing wiki will not automatically move
the data to new tables, though. This task would fall under the topic of
migrating wikis between/within databases for which you should find many
resources in the MediaWiki documentation. For SMW, it suffices to
re-initialise the database, and to rebuild the database content once the
MediaWiki pages were moved (this can usually be done via a web
interface, see the SMW documentation on "Repairing SMW" for details).
-- Markus
Thank you Markus for your reply and the information you provided for the
wiki migration.
But still it is not totally clear to me. Even if I use the database
prefix, for example wiki1 for the one wiki and wiki2 for the second one,
any change affecting the tables with wiki1 prefix, will affect the
tables currying wiki2 prefix?If I create a page using the first wiki
whose table has the prefix wiki1, will it appear on the second wiki (the
one whose tables has wiki2 as prefix)?
Superficial me -- I misinterpreted your notion of "discrete" and skipped
the crucial last sentence in your question. I think you are rather
looking for the opposite of what I suggested: two distinct code bases
(installation directories, possibly with code sharing) with the same
database tables.
I don't think that there should be big issues having two MediaWiki
installations of the same version using (exactly) the same database
connection settings, i.e. acting on the same tables. I cannot currently
imagine any problems with this at all, but maybe some people on this
list have some more fantasy than I. Difficulties could occur if
additional infrastructure is used around MediaWiki, in particular
caching services. In this case, changes on one site must also make sure
to invalidate external caches on the other. Otherwise some people might
see older copies of pages etc. on one of the sites in some situations.
Extensions that have their own database table for storing some
additional page-related data (like SMW) are very similar to caches in
this context, and they would not work reliably if used only on one of
the sites.
Besides this, the main constraint for the setup thus seems to be that
you must really have the same version and settings for both MediaWikis,
and that you have to be careful with extensions that introduce new
features (like ParserFunctions) that people can use in wiki text. Such
features would only be interpreted properly on the site that has the
extension installed. The setup might also be unsuitable for extensions
that modify MediaWiki code (like the Halo extension does).
So AFAIR the basic setup with same DB settings for two sites should be
possible, and that it is mainly a question of which extensions you want
to use. As usual, if you do experiments on a production system, then you
should of course be sure to have backups of your data.
-- Markus
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l