Difference between revisions of "Add a wiki database"

From Organic Design wiki
(oops wasn't mpved from tmp)
({{legacy}})
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{legacy}}
 
{{procedure
 
{{procedure
|description = Use this process to set the password for a MediaWiki user.
+
|description = This process defines the steps involved in adding a new version of the MediaWiki software to an existing environment created by [[Install a new server|installing a new server]].
 
|role = Sysop
 
|role = Sysop
|status = in use
+
|status = legacy
 
}}
 
}}
  
You need to log in to the database directly. Then obtain the user's id as in the following example:
+
New wiki databases are added by copying from a template database for the version of MediaWiki the wiki will run on. A template exist for every code-base in the wikia because they get created during the [[install a MediaWiki code-base]] procedure.
<pre>
+
 
    SELECT user_id FROM prefix_user WHERE user_name='user';
+
If you intend on creating the new wiki in a new database, you'll first need to create the new database manually, for example by logging in to MySQL:
</pre>
+
<source>
Then and apply the query shown in the following example to set the password for that user id (here the user id is 2222):
+
create database foo;
<pre>
+
</source>
    UPDATE prefix_user SET user_password=md5(CONCAT('2222-',md5('newpassword'))) WHERE user_id=2222;
+
You can then make a copy of the template database and define a table prefix for the new wiki tables using our [[add-db.pl|add-db script]] as follows. The best practice is that a table prefix should always be used even if there is only one wiki, and the prefix should always end with an underscore character.
</pre>
+
<source>
 +
/var/www/tools/add-db  /var/www/empty-1.13.sql  foo.bar_  foo.baz_
 +
</source>
 +
In this example, two wiki databases have been added at once, both in the new "foo" database we created, one wiki has tables prefixed by "bar_" and the other by "baz_". Both new wiki's are copies of the ''empty-1.13.sql'' template which was created when the ''MediaWiki-1.13'' code-base was installed into the wikia.
 +
 
 +
== Next ==
 +
After installing a wiki database, you can then [[install a new wiki]].
 +
 
 +
== See also ==
 +
*[[Install a MediaWiki code-base]]
 +
*[[Install a new wiki]]
 +
*[[add-db]]
 +
[[Category:Wikia]]

Latest revision as of 22:31, 24 June 2020

Legacy.svg Legacy: This article describes a concept that has been superseded in the course of ongoing development on the Organic Design wiki. Please do not develop this any further or base work on this concept, this is only useful for a historic record of work done. You may find a link to the currently used concept or function in this article, if not you can contact the author to find out what has taken the place of this legacy item.
Procedure.svg Add a wiki database
Organic Design procedure

New wiki databases are added by copying from a template database for the version of MediaWiki the wiki will run on. A template exist for every code-base in the wikia because they get created during the install a MediaWiki code-base procedure.

If you intend on creating the new wiki in a new database, you'll first need to create the new database manually, for example by logging in to MySQL:

create database foo;

You can then make a copy of the template database and define a table prefix for the new wiki tables using our add-db script as follows. The best practice is that a table prefix should always be used even if there is only one wiki, and the prefix should always end with an underscore character.

/var/www/tools/add-db  /var/www/empty-1.13.sql  foo.bar_  foo.baz_

In this example, two wiki databases have been added at once, both in the new "foo" database we created, one wiki has tables prefixed by "bar_" and the other by "baz_". Both new wiki's are copies of the empty-1.13.sql template which was created when the MediaWiki-1.13 code-base was installed into the wikia.

Next

After installing a wiki database, you can then install a new wiki.

See also