If you only want to delete very old messages, have access to cron and able to run perl code, then you could do something like this:
Note: The code has been edited to only include clearing the profile update log, it will require testing.
Perl code
Code:
#!/usr/bin/perl -w
use DBI;
use DBD::mysql;
use strict;
my $db = 'DB_NAME';
my $conn = ConnectToMySql($db);
my $query = '';
###########################
#
# Profile Update Logger - Clear logs over 93 days old.
#
$query = "delete from `PREFIX_comprofiler_plug_pulogger`
where `changedate` < DATE_SUB(NOW(), INTERVAL 93 DAY);";
$statement = $conn->prepare($query);
$statement->execute();
###############
###########################
#
# The End
#
exit;
#####################################################
#
# sub ConnectToMySql - Create MySQL Connection
#
sub ConnectToMySql {
my ($db) = @_;
open(ACCESS_INFO, "</SECURE_DIR/.SECUREFILE") || die "Can't access login credentials";
my $host = 'localhost';
my $userid = 'root';
my $passwd = <ACCESS_INFO>;
my $connectionInfo="dbi:mysql:$db;$host";
close(ACCESS_INFO);
chomp ($host, $userid, $passwd);
my $l_connection = DBI->connect($connectionInfo,$userid,$passwd);
return $l_connection;
}
#
# End sub ConnectToMySql
#
#####################################################
Last edit: 9 years 2 months ago by davidmarshall15.