Difference between revisions of "Add a wiki database"

From Organic Design wiki
(oops wasn't mpved from tmp)
(Undo revision 88906 by Nad (Talk)oops)
Line 1: Line 1:
 
{{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 = in use
 
}}
 
}}
  
You need to log in to the database directly. Then obtain the user's id as in the following example:
+
== Usage ==
 +
 
 +
'''Note:''' The databases referred to in the add-db command must pre-exist
 +
 
 
<pre>
 
<pre>
     SELECT user_id FROM prefix_user WHERE user_name='user';
+
     add-db TEMPLATE DB1.PREFIX1 [DB2.]PREFIX2 [DB3.]PREFIX3...
</pre>
+
 
Then and apply the query shown in the following example to set the password for that user id (here the user id is 2222):
+
    Where,
<pre>
+
        TEMPLATE is the name of the *.sql file or db.prefix to use as the template.
    UPDATE prefix_user SET user_password=md5(CONCAT('2222-',md5('newpassword'))) WHERE user_id=2222;
+
 
 +
        DB*.PREFIX* are the databases to replicate the template into and the
 +
        table prefixes to use (prefixes are mandatory).
 
</pre>
 
</pre>
 +
Notes:
 +
*There is also an add-wiki script in MW maintenance dir which we need to check out
 +
*The database dump being used as a template should only contain one wiki.
 +
*It should not include create or drop database statements.
 +
*The destination databases must already exist
 +
*The destination tables will be replaced if they exist
 +
*The DB part is optional for all but the first and means to continue using the previous database.\n"
 +
 +
== Next ==
 +
After installing a wiki database, you can then [[Install a new wiki|install the wiki]].
 +
 +
== See also ==
 +
*[[add-db.pl]]

Revision as of 20:24, 21 November 2008

Procedure.svg Add a wiki database
Organic Design procedure

Usage

Note: The databases referred to in the add-db command must pre-exist

    add-db TEMPLATE DB1.PREFIX1 [DB2.]PREFIX2 [DB3.]PREFIX3...

    Where,
        TEMPLATE is the name of the *.sql file or db.prefix to use as the template.

        DB*.PREFIX* are the databases to replicate the template into and the
        table prefixes to use (prefixes are mandatory).

Notes:

  • There is also an add-wiki script in MW maintenance dir which we need to check out
  • The database dump being used as a template should only contain one wiki.
  • It should not include create or drop database statements.
  • The destination databases must already exist
  • The destination tables will be replaced if they exist
  • The DB part is optional for all but the first and means to continue using the previous database.\n"

Next

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

See also