Notifications
Clear all

C4P and MySQL

18 Posts
6 Users
0 Reactions
2,621 Views
(@cloudy)
Trusted Member
Joined: 18 years ago
Posts: 59
Topic starter  

What is the latest version of C4P and where can i download it from??

Currently have C4p v3.3 and struggling to get it to talk to our MySQL database.

All help apprecaited


   
Quote
binarybod
(@binarybod)
Reputable Member
Joined: 17 years ago
Posts: 272
 

cloudy,

I have pm'd you. There are a number of problems to overcome - especially if you are using 64bit Windows but all are solvable.

Paul


   
ReplyQuote
(@cloudy)
Trusted Member
Joined: 18 years ago
Posts: 59
Topic starter  

Finally got round to trying to get this setup. I have installed C4P & C4P Review as well as mySQL along with the GUI tools. I have created a database called c4p_hash and created a user c4p_user and have given the user privileges for the database. I have been trying to run the script SQL Database.sql (which comes with c4p review) which should create the two tables i need for the database (c4p_Hash & Conflicts).

However every time i try and run the script i get the following errors

1064 right syntax to use near 'i' at line 1

or

error 2

Has anyone had any experience of this, or can inform me what the problem is??


   
ReplyQuote
binarybod
(@binarybod)
Reputable Member
Joined: 17 years ago
Posts: 272
 

Cloudy,

It looks like you are using a Microsoft SQL file to create a MySQL schema. They are different dialects of the SQL standard and apart from simplistic statements they are incompatible.

A while ago I wrote the MySQL version of the script
-- MySQL script to create schema for C4P from scratch
--
-- Paul Tew 2006
--
-- Use with care - there are no guarantees!
-- Definately do not use if you have an existing database
-- with data in it - !!!YOU HAVE BEEN WARNED!!!
--
-- From the command line use
-- mysql -u root -p < [Location and name of this file]
--
-- Tested using MySQL 5.0.22 on Windows XP and Linux

-- Create the database schema - if one exists then the
-- script halts (unless --force option is turned on)
CREATE DATABASE C4P_Hash
CHARACTER SET latin1
COLLATE Latin1_general_ci;

-- Drop tables if they exist
DROP TABLE IF EXISTS C4P_Hash.C4P_Hash;
DROP TABLE IF EXISTS C4P_Hash.conflicts;

-- Create Tables
CREATE TABLE C4P_Hash.C4P_Hash (
HASH_Value VARCHAR(35) NOT NULL DEFAULT '',
source VARCHAR(50) NOT NULL DEFAULT '',
category INTEGER NOT NULL DEFAULT 0,
str1 VARCHAR(50),
str2 VARCHAR(50),
seriesName VARCHAR(500),
havePic VARCHAR(50),
victimID VARCHAR(50),
PRIMARY KEY(HASH_Value),
KEY index_source (source),
KEY index_category (category)
)
ENGINE = InnoDB;

CREATE TABLE C4P_Hash.conflicts (
conflictHASH VARCHAR(35) NOT NULL DEFAULT '',
currCat INTEGER NOT NULL DEFAULT 0,
currSource VARCHAR(50) NOT NULL DEFAULT '',
currVictimID CHAR(10) NOT NULL DEFAULT '',
currLocationID CHAR(10) NOT NULL DEFAULT '',
currSeriesID CHAR(10) NOT NULL DEFAULT '',
newCat INTEGER NOT NULL DEFAULT 0,
newSource VARCHAR(50) NOT NULL DEFAULT '',
newVictimID CHAR(10) NOT NULL DEFAULT '',
newLocationID CHAR(10) NOT NULL DEFAULT '',
newSeriesID CHAR(10) NOT NULL DEFAULT '',
PRIMARY KEY(conflictHASH)
)
ENGINE = InnoDB;

-- Now create (or alter) the C4P User account
GRANT ALL PRIVILEGES ON C4P_Hash.*
TO 'c4p_user'@'%'
IDENTIFIED BY 'password' WITH GRANT OPTION;

have fun…

Paul


   
ReplyQuote
(@cloudy)
Trusted Member
Joined: 18 years ago
Posts: 59
Topic starter  

ah that could be the problem!!!

Take it i can run it through mysql gui tools??

SO this script will create the two tables that we need??


   
ReplyQuote
binarybod
(@binarybod)
Reputable Member
Joined: 17 years ago
Posts: 272
 

Yes and yes )


   
ReplyQuote
(@cloudy)
Trusted Member
Joined: 18 years ago
Posts: 59
Topic starter  

Cool now for another silly question (apologies never used any form of sql before)

I now have the two tables created within c4p_Hash database.

When i load C4P (v3.3.4) i am presented with 2 options for the DB platform, MS Access and MS SQL Server, no option for MySQL. Is there a newer version of C4P that has an option for MySQL??


   
ReplyQuote
binarybod
(@binarybod)
Reputable Member
Joined: 17 years ago
Posts: 272
 

The MySQL database holds all the hashes of all the pictures (and movies if you are using C4M). When you run C4P for the first time it creates a LOCAL database that can be transported with the rest of the case. This local database used to be Access only but because this has limitations on filesize and record numbers, Trevor allowed for the creation of a localised MS SQL database too.

If we call the MySQL database, database A and the local database, database B then here's how things should run

1 In EnCase, run the OPP EnScript, point the script at Database A to pre-categorize the pictures it finds.
2 Run C4P and create a new local database (database B) and load in the XML files created by the EnScript. C4P will consolidate any duplicates and assigned the pre-categorized pictures and thereby reduce the number of pictures you have to look at (anywhere between 30% to 80% reduction in my experience).
3 Categorize all uncategorized pictures using C4P (I can do somewhere between about 3,000 and 50,000 an hour depending on how much flesh tone is in the pictures)
4 Export the C4P hash database (from database B) to a '.c4p' hash file
5 Use C4P Review to upload the hash file to database A
6 Resolve any conflicts within database A using C4P Review
7 Import the results of the C4P case back into EnCase using the C4P bookmark import script.

That's an outline - the details are in the manuals on the OPP site.

Paul


   
ReplyQuote
(@cloudy)
Trusted Member
Joined: 18 years ago
Posts: 59
Topic starter  

So the mysql database is where all our hash values will be stored. When we run c4p for each case do we just create a MS Access database, is this correct??

So we run the opp enscript, and point it to the mysql database (c4p_hash), run c4p and create a local MS Access database and load in the xml files created by the script, categorize the pictures, export the hash database (MS Access) to a *.c4p hash file, resolve conflicts in mysql database and then import the c4p reslusts back into ecase??


   
ReplyQuote
binarybod
(@binarybod)
Reputable Member
Joined: 17 years ago
Posts: 272
 

You're winding me up, right? lol

In case you aren't - RTM !

Paul


   
ReplyQuote
Page 1 / 2
Share: