Closed elonen closed 4 years ago
Well, yes, the parser creates the tables automatically, but the db host, db user, db password you have to create beforehand manually and then inject it into the env of the container as described in the README - did you do that? of course you could fork this image and just create one which includes an "empty root pw" mysql db and go from there, but at least I do already have a mysql running in another container where I setup the db, user, pw accordingly.
mysql> show grants for 'dmarc_report'@'%';
+----------------------------------------------------------------+
| Grants for dmarc_report@% |
+----------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'dmarc_report'@'%' |
| GRANT ALL PRIVILEGES ON `dmarc_report`.* TO 'dmarc_report'@'%' |
+----------------------------------------------------------------+
2 rows in set (0.00 sec)
Yes, before I made sure it creates the database and the user, error message showed something like "no permission", instead of Table 'dmarc.report' doesn't exist
. If it's supposed to auto-create the tables, guess I'll need to debug further.
Apparently, the tables aren't created until the first DMARC report arrives.
Apparently, the tables aren't created until the first DMARC report arrives.
Yep, can confirm. I had the same error, manually running the cron command created the table and everything.
@dabide @lgg42 @gutmensch @elonen Any update on this issue?
So, I don't exactly know how I could fix this.
It would be probably the easiest to contribute an "init" command to the original parser source code (link is also in the README.md) or if somebody contributes a patch for the perl file here, which we can use in the Dockerfile build, so that we would see if upstream changes and build fails.
Personally I'm really bad at Perl, so I would leave this up to a contributor. I'll gladly add someone to the project with write permissions.
I was able to run the cron and create all the missing tables after tweaking MySql a little. So I would not worry about this issue too much. After all the tables are created, it started to pull the xml files from gmail. Everything is looking good now.
The
techsneeze/dmarcts-report-parser
script seems to contain code for creating tables if they are missing, but I always seeQuery failed: Table 'dmarc.report' doesn't exist (Error #1146)
when browsing the Docker service address.Is there something that needs to be done to make it create the tables, and if it simply doesn't work, maybe document the required table schema?