[support] Database problem

Craig Forbes cpforbes at gmail.com
Tue Dec 23 08:55:56 UTC 2008


I can't be sure but from your limited description, I'm guessing that
somehow you have gotten your auto increment values out of sync with
the maximum value in that table.

I'm not sure what column is the auto_increment column in that table
but if that is the problem here is the solution:

NOTE: Before attempting this solution backup your database if you
haven't already. In fact, even if you already have backed it up back
it up again before attempting this.

1) figure out what the max value for the auto_increment columns is:
select max(COLNAME) from accesslog;

note the result.

2) To check if this is the problem you can use this command:
show table status like 'accesslog'

if the auto_increment column is less than the max value noted in step
1 then this is your problem.

3) to reset the auto_increment value:

alter table accesslog auto_increment=VALUE+1;

>From your other problem it seems possible that you have a corrupted
database.  Are you able to do a mysqldump on the database? If not try
to dump each table individually.


 -Craig

On Mon, Dec 22, 2008 at 5:55 PM, Steve Kessler
<skessler at denverdataman.com> wrote:
> I am sorry to resubmit this but I have not head back and the problem is now
> getting worse.
>
> I am now getting this message if not logged in:
>
> user warning: Duplicate entry '237595' for key 1 query: INSERT INTO
> accesslog (title, path, url, hostname, uid, sid, timer, timestamp)
> values('Affiliate Partner Programs ', 'node/198', '', '24.9.62.24', 1,
> '25c7d7324789e378b9c4fc9c2e66922e', 799, 1229989930) in
> /home/kadimaso/public_html/denverdataman/includes/database.mysql.inc on line
> 174.
>
> I have tried to repair the tables in PHP My Admin and any help is much
> appreciated.


More information about the support mailing list