MariaDB/MediaWiki: Difference between revisions

From Bibliotheca Anonoma
(Created page with "You must install either MySQL or MariaDB on your Linux distribution. MariaDB is strongly preferred, but otherwise they are both compatible as they are forks. * Repository Gen...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:


{{bc|
{{bc|
sudo systemctl start mariadb
sudo systemctl start mysql
}}
}}


Line 16: Line 16:


{{bc|
{{bc|
sudo systemctl enable mariadb
sudo systemctl enable mysql
}}
}}


Finally, create a database and user for MediaWiki to use. Remember this database name, username and password, since you will need it once you configure MediaWiki. Change the ''password'' placeholder with your real password.
Finally, create a database and user for MediaWiki to use. Remember this database name, username and password, since you will need it once you configure MediaWiki. Change the ''password'' placeholder with your real password.


{{bc|
{{hc|sudo mysql|<nowiki>
CREATE DATABASE wikidb;
CREATE DATABASE wikidb;
GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost' IDENTIFIED BY 'password';
|lang=sql}}
FLUSH PRIVILEGES;
</nowiki>}}

Latest revision as of 04:32, 16 April 2017

You must install either MySQL or MariaDB on your Linux distribution. MariaDB is strongly preferred, but otherwise they are both compatible as they are forks.

Then, follow these instructions to set up the database securely.

https://mariadb.com/resources/blog/installing-mariadb-10-centos-7-rhel-7

Now, start the MySQL/MariaDB server for the first time.

sudo systemctl start mysql

Once the server works, enable it to start at every boot.

sudo systemctl enable mysql

Finally, create a database and user for MediaWiki to use. Remember this database name, username and password, since you will need it once you configure MediaWiki. Change the password placeholder with your real password.

sudo mysql
CREATE DATABASE wikidb;
GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;