Use same database for two different domains
While installing Mediawiki you have to supply installation script with correct mySQL credentials. These are:
- Database name (which should be the same for both of your wikis)
- Username and password
You should take care of database prefixes for your installations. See Manual:$wgDBprefix.
I didn't explain it well enough...Sorry.
I don't want to use different table extension such as a_table and b_table.
I want both domains to pull from the existing tables in a single database as is and display the info and images on either domain.
Say Domain 1 has a table "pages" and stored in that table are all the pages from that domain. I want domain 2 to be able store its pages (of different names) in the same database and both domains to be able to pull thoses pages from there in addition to being able to store pages from each domain and extracting them at will from either domain.
If I store a page, say "horses" for example, in the database from domain 1, I want to be able to click a hyperlink on domain 2 and be able to pull the info and images stored in the database by domain 1 into a page on on domain 2 named "horses"
I know, clear as mud right?
MediaWiki: v1.16.0 | PHP: v5.2.14 (cgi-fcgi) | MySQL: v5.1.52 | Apache: v2.2.17 | All assistence is greatly appreciated.
Assuming both domains are running on the same server in different virtual hosts, it should be as simple as specifying the same database information for them. Just ensure the following variables are the same across both installations: $wgDBserver, $wgDBname, $wgDBuser, $wgDBpassword, $wgDBprefix.
If that's true, they should be effectively sharing all information.
I'm not sure what the consequences for caching would be. It should be possible, as Wikimedia uses a setup like that, where en.wikipedia.org is also accesible via secure.wikimedia.org
Try setting it up on your localhost using two different domains in your hosts file. If there's not a problem there, there shouldn't be a problem in a virtual host situation.
Each installation of MediaWiki will cache independently of each other unless you're hoping to use the same installation with two different sites, in which case, that's a custom scenario and I don't think you should be posting here but at a different forum for people trying to do weird things with their installations. Not a forum for general help questions.
As far as I'm aware the cache keys are based on wfWikiId(), so they would use the same cache items.
Note that it is not helpful to redirect users with support questions to non-existing forums, if you want to do weird things with MediaWiki this place is probably the place where the most knowledged users reside.
I am also in this situation. I am using the same Database for two wikis. The reason for this is that I had to move to a free host and the free host didn't have the level of Database software required to run the Wiki. I had another commercial site on another server that did have the level of Database required. So I decided to have the wiki on the free host use the database on the paid host. I can't have it all on the paid host because the paid host allows only one domain but multiple databases :-)
The only problem I've had is that the free host is very slow when accessing the database on the paid host. Does anyone have any idea why this might be?
Free: http://informationism.org/mediawiki/index.php?title=Main_Page
Paid: http://www.glenorchy.net.nz/mediawiki/index.php?title=Main_Page