diamondd
diamondd

Reputation: 11

How can I create a secondary database to run alongside my MediaWiki server?

Firstly, my aim is to create a database to store statistical information about my wiki articles, that is derived using extensions that I have written for my MediaWiki server. Then via another extension on my server, I wish to access this secondary database and use the information to edit the output of the final article page.

I wanted to try and make a separate database to avoid introducing errors to the existing MediaWiki schema. Is this possible? I can't find any information about running an additional mySQL database alongside a MediaWiki installation.

I feel as though the better solution may be to add a table to the existing schema, but I'm not sure how to deal with the existing infrastructure without breaking it. I believe I can just use standard CREATE commands but mySQL is unfortunately not my strong point.

Thanks

Upvotes: 1

Views: 248

Answers (2)

Mandar Pande
Mandar Pande

Reputation: 12974

Hope i understood your problem. say you have media wiki server or a mysql server running on port 3308 and you want to create another mysql instance. Follow this step:

bkp my.cnf file

start first instance on port 3308

chnage my.cnf settings & make it run on 3307

start second instance of mysql

If you have good h/w,swap/RAM, you can easily create such 4-5 instances & all will be running good.

Upvotes: 1

Christian
Christian

Reputation: 1840

You can run a separate database along with the primary MediaWiki database. You just have to open a connection to it specifically using the PHP MySQL API.

Adding a new table to the existing database though is really easy and probably your best bet. You will be able to take advantage of the built-in database load balancing if your site ever gets big. To learn how to create a new table from an extension, check out this page of documentation.

Upvotes: 0

Related Questions