diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2008-10-09 22:49:18 +1100 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2008-10-09 22:49:18 +1100 |
commit | 4a039197705f92ee1c362401a7f7bb834ecc9079 (patch) | |
tree | 4d5ab43e19b9e0edb1c990a0baa92c4b63a1d79b /docs | |
parent | 65404776f7f0e975737a5c8c69dc0b2ae5fe93da (diff) | |
download | patchwork-4a039197705f92ee1c362401a7f7bb834ecc9079.tar.bz2 patchwork-4a039197705f92ee1c362401a7f7bb834ecc9079.tar.xz |
[sql] use separate grant-all scripts for postgresql and mysql
Mysql doesn't support granting to multiple tables, and requires a
different username format.
Would be nice to code the permissions somewhere, then generate the
grant statements as required.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/INSTALL | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/docs/INSTALL b/docs/INSTALL index 8f3aab9..05fea7c 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -29,16 +29,21 @@ in brackets): user that your mail server runs as). On Ubuntu these are www-data and nobody, respectively. - PostgreSQL: - createdb patchwork - createuser www-data - createuser nobody + For PostgreSQL - MySQL: + $ createdb patchwork + $ createuser www-data + $ createuser nobody + + - postgres uses the standard UNIX authentication, so these users + will only be accessible for processes running as the same username. + This means that no passwords need to be set. + + For MySQL: $ mysql > CREATE DATABASE 'patchwork'; - > INSERT INTO user (Host, User) VALUES ('localhost', 'www-data'); - > INSERT INTO user (Host, User) VALUES ('localhost', 'nobody'); + > CREATE USER 'www-data'@'localhost' IDENTIFIED BY '<password>'; + > CREATE USER 'nobody'@'localhost' IDENTIFIED BY '<password>'; 2. Django setup @@ -99,8 +104,10 @@ in brackets): And add privileges for your mail and web users: Postgresql: - psql -f lib/sql/grant-all.sql patchwork + psql -f lib/sql/grant-all.postgres.sql patchwork + MySQL: + mysql patchwork < lib/sql/grant-all.mysql.sql 3. Apache setup |