Skip to main content.

2002-Jan-31

Learning more MySQL. I have a broken forum, so I was trying to figure out a way to fix it. I looked at the MySQL Tutorial at http://www.mysql.com/documentation/mysql/bychapter/manual_Tutorial.html and followed a few steps.

I saw what databases where available with:

show databases;
I selected the database to use with:
use db_phpbuild
Then to find what tables where available I did:
show tables;
I could see the record with:
SELECT * from tbl_coding_forum where id = 1009089;
I checked the table with:
check table tbl_coding_forum;
And:
check table tbl_coding_forum extended;
Nothing was wrong. I deleted this with:
delete from tbl_coding_forum where id = 1009089 limit 1;
(I found how to delete from the examples in the online MySQL manual.)

Things still had problems. The page to view the forum was blank.

mysql> select max(thread) as thread from tbl_coding_forum;
+---------+
| thread  |
+---------+
| 1009089 |
+---------+
1 row in set (0.00 sec)
But the recent posting was id 174053. So i did:
select * from tbl_coding_forum where id > 174050;
And I saw that six records (rows?) were available; 174055 was largest in this series of numbers, but one was also 1009093.

I looked at the phorum code and saw that it figures out the max threads and then only displays the top 50.

Then I remembered that there was several threads to that item I removed. I am not sure why it didn't display any. So I deleted all those too (around 100). The forum appears to work now. I am not sure why the postings for that one bogus thread weren't working. (I guess because the ID number was so much larger than the rest.)

To switch from sendmail to exim using rpm, remove sendmail with:

rpm -ev --nodeps sendmail
That's because other RPMs have dependencies to "smptdaemon". (The Exim RPM should provide that.)