Index: dv-opendmarc-0.1.5/db/schema.mysql =================================================================== --- dv-opendmarc-0.1.5.orig/db/schema.mysql 2012-07-20 11:53:28.000000000 +0200 +++ dv-opendmarc-0.1.5/db/schema.mysql 2012-07-20 12:01:26.000000000 +0200 @@ -1,7 +1,6 @@ --- OpenDMARC database schema --- --- Copyright (c) 2012, The Trusted Domain Project. --- All rights reserved. +-- create a new table +CREATE DATABASE IF NOT EXISTS opendmarc; +USE opendmarc; -- A table for mapping domain names and their DMARC policies to IDs CREATE TABLE IF NOT EXISTS domains ( @@ -18,11 +17,11 @@ id INT NOT NULL AUTO_INCREMENT, domain INT NOT NULL, repuri VARCHAR(255) NOT NULL, - adkim TINYINT NOT NULL, - aspf TINYINT NOT NULL, - policy TINYINT NOT NULL, - spolicy TINYINT NOT NULL, - pct TINYINT NOT NULL, + adkim TINYINT NOT NULL, + aspf TINYINT NOT NULL, + policy TINYINT NOT NULL, + spolicy TINYINT NOT NULL, + pct TINYINT NOT NULL, firstseen TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, lastsent TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', @@ -81,3 +80,12 @@ PRIMARY KEY(id) ); + +-- Create a separate user for opendmarc +-- CREATE USER 'opendmarc'@'localhost' IDENTIFIED BY 'xxx'; +-- GRANT ALL ON opendmarc.* to 'opendmarc'@'localhost'; + +-- to change the password: +-- mysql -p mysql +-- update user set password=PASSWORD("NEW-PASSWORD-HERE") where user='opendmarc'; +-- flush privileges;