From e582958892c076caaff5c55818546e2a824f0686 Mon Sep 17 00:00:00 2001 From: Davide Baglieri Date: Mon, 26 Feb 2018 19:14:43 +0100 Subject: [PATCH] Fix for the "Data truncated for column..." warning Adding a STIX file bigger than 65,535 bytes, the mysql max size for text type is reached. So the file is truncated and not importable in MISP via the OpenTAXII hook. Here is my pragmatic solution. --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 8aa28af..c38302a 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,28 @@ This will run the polling script every 6 hours to keep things all synced up. ## Troubleshooting +### Data truncated for column... + +```python +Warning: (1265, "Data truncated for column 'original_message' at row 1") + +Warning: (1265, "Data truncated for column 'content' at row 1") +``` + +If you encounter the error above, this means you tried to push a STIX file bigger than 65,535 bytes. To fix it run the following commands. +```bash +mysql -u [database user] -p +# Enter Database password + +mysql> use taxiipersist; + +mysql> alter table `inbox_messages` modify `original_message` LONGTEXT; + +mysql> alter table `content_blocks` modify `content` LONGTEXT; + +mysql> exit; +``` + ### Specified key was too long ```python