MediaWiki-Docker/Configuration recipes/Alternative databases

Alternative databases
The default configuration uses SQLite for the database backend, but you can use MySQL (with replication or without) or Postgres instead.

MySQL (database replication)
These instruction assume a new installation (no LocalSettings.php).

Install MediaWiki with the following command:

After installing, add these snippets so that MediaWiki knows to read from the replica but write to the main database.



MySQL (single database server)
These instruction assume a new installation (no LocalSettings.php).



Install MediaWiki with the following command:

Postgres (single database server)
These instruction assume a new installation (no LocalSettings.php).



To install the MediaWiki database tables, use: