Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Negative link number

Quote Reply
Negative link number
My categories occasionally show negative numbers for number of links. If I repair tables, it will sometimes fix it, but not always. Right now I have a (-2) for one category and repairing tables has no effect. Is this a known bug and is there a fix? Thanks.

Carl
Quote Reply
Re: Negative link number In reply to
Hi,

This is most likely table corruption. You or your ISP should run myisamchk on your mysql data tables. This happens typically when mysql is not shut down properly.

Cheers,

Alex

--
Gossamer Threads Inc.

Last edited by:

Alex: Sep 11, 2001, 9:23 AM
Quote Reply
Re: [Alex] Negative link number In reply to
Thanks for the reply Alex. I have my own server. Can you tell me how I run this and whether it poses any risk to my database? Thanks.
Quote Reply
Re: [cco] Negative link number In reply to
Hi,

You should:

1. Stop MySQL
2. Run `myisamchk -e -f *.MYI` inside your links database directory (probably /usr/local/mysql/data/links or /var/lib/mysql/links).
3. Start MySQL

That should be it! It won't cause any damage to your data, just make sure mysql is stopped when you run it (which does mean your site will be affected).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Negative link number In reply to
Alex,

I followed your instructions and got this error:

/usr/bin/myisamchk: error: File '*.MYI' doesn't exist

Thanks,
Carl

Quote Reply
Re: [cco] Negative link number In reply to
Hi,

You must not have been in the proper directory. If you do an ls for files, you should see three files for each links sql table.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [cco] Negative link number In reply to
I just tried it to, but on a different database, and got the same error.

Is *.MYI looking for files with a .MYI extension, becuase none of the files in any of my db folders have it?

Cheers,
Regan.
Quote Reply
Re: [ryel01] Negative link number In reply to
Alex,

I assumed that I had to go to the directory that had 'myisamchk'. That's where I ran it. The error ---File '*.MYI' doesn't exist --- implies that it is looking for files with that extension. I don't see any files anywhere with that extension??

Carl




Quote Reply
Re: [cco] Negative link number In reply to
Hi,

No, your actual data files are in a different directory, most likely /var/lib/mysql, but it depends on your system setup. If you have full mysql access, you can do `mysqladmin vars` and look at what data_dir is set to. You want to go to that directory, and from there you'll see a subdirectory called links (or whatever your database is named).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Negative link number In reply to
Got it! Thanks very much Alex for your patience with a novice user.

Carl