Changes

Jump to: navigation, search

Help:Installation/Users

4,043 bytes added, 19:11, 16 March 2006
no edit summary
Maybe the hardest part of the mediawiki installation is to deal with users.

When installing the mediawiki in the same server as your mysql is hosted,
there are 5 users involved in a such installation:

# wiki's SysOp - the administrator of the wiki. It only has access to the webinterfaces, so you'll never use it for shell commands.
# single host user - a normal user account on the server system.
# single database user - a normal user account on the mysql server.
# root host user - the superuser of the server system.
# mysql's root user - the superuser of the mysql's entire database management.

The mediawiki script installer http: //your_machine/wiki/config/ will require
you to set the wiki's SysOp account and provide either
- a single database user (and its password);
- or the mysql's root user password.

You will need a wiki's SysOp account only when the mediawiki is installed.

You need a single host user to some management that can't be done through the
web (uncompress the mediawiki distribution files, upgrade, change css files,
etc).

You need root host access if:
* You have no single database user;
* You don't have the mysql's root password;
* You don't want/have permission to install php pages on your $HOME/public_html.

This article deals with users, so, we explain only the two former. We will
explain how to create the single database user. Everywhere
you see ''sudo'' you'll need the root host password. Elsewhere, you'll need
to have the mysql's root password.

Now logged with shell access to the mysql machine server,
as your single host user:
mysqladmin -u root create wikidb -p
Enter password:
input your mysql's root password, or, if you don't know, try enter to see if
really there is a mysql's root password set.
If you type the wrong password, it'll appear:
Access denied for user: 'root@localhost' (Using password: YES)
(For those who don't remember the mysql's root password, at the end of
this section there is an explanation). Else, nothing will appear
(or some errors that may overrun the scope of this documentation).

mysql -u root -p
Enter password:
input your mysql's root password, or, if you don't know try enter.
If you type the wrong password, it'll appear:
Access denied for user: 'root@localhost' (Using password: YES)
For those who don't remember the mysql's root password, at the end of
this section there is an explanation.
Else:
mysql>
See if the database was really created by the mysqladmin:
mysql> show databases;
+----------+
| Database |
+----------+
| mysql |
| test |
| wikidb |
+----------+
3 rows in set (0.00 sec)

Then:
mysql> GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION ;

Exit :
mysql> exit

Now, you can go to the installer script: http://your_machine/wiki/config/
and provide the wikiuser and the password you have set in the GRANT
mysql command. Don't provide any root password.

If you don't remember the mysql's root password, you can add the option:
skip-grant-tables
to the region [mysqld] of your file /etc/my.cnf. It's suggested that,
in this moment, you don't allow external connections to the mysql
database, enabling this option on the same region [mysqld] of the same
file /etc/my.cnf:
skip-networking
Because, when you restart the daemon, everyone will have root access to
the mysql server (root access required to edit these files). It's also
suggested that you don't allow any type of shell logins in this moment,
such as ssh and rsh (for the same reason).

Restart the server. The command depends on your Linux
distribution. For Fedora (2, but should work in every RedHat based
distros):
sudo /etc/init.d/mysqld restart
Slackware (10.2, but should work in every Slackware based distros):
sudo /etc/rc.d/rc.mysqld restart
for opensuse 10 use
sudo /etc/init.d/mysql restart

Now, you can follow the commands seen above:

mysqladmin -u root create wikidb -p
mysql -u root -p

After that, don't forget to edit again the /etc/my.cnf '''and''' restart the server.
Anonymous user

Navigation menu