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).

TODO: Add install command. (You can use the web installer and specify mariadb-main as the server name, "root" as the user and "main_root_password" as the password.

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).



To install the MediaWiki database tables, use:

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



To install the MediaWiki database tables, use: