Tag Archives: mysql database

quick fixes for my mysql databases.

It’s the summer, and durring the summer heat servers tend to act more like unstable demons than they should.

My machine has been randomly rebooting, hard locking, and all around pain in the ass the past week or two.

Everytime it does this my mysql databases seem to get funky, and the easiest sign to this is when I view this blog.

Ultimate Tag Warrior tells me there is some kind of error in the wp_postmeta table.

The easy fix for this is to cruise over to my phpmyadmin on the server and run a simple repair table operation on all of my wordpress tables. note: you may or may not have all the same tables I do in my wordpress database.

REPAIR TABLE `wp_categories` , `wp_comments` , `wp_dl` , `wp_dlmap` , `wp_downloads` , `wp_falbum_cache` , `wp_kiwi` , `wp_linkcategories` , `wp_links` , `wp_openid_associations` , `wp_openid_assoc_handles` , `wp_openid_trust` , `wp_options` , `wp_post2cat` , `wp_post2tag` , `wp_postmeta` , `wp_posts` , `wp_tags` , `wp_tag_synonyms` , `wp_usermeta` , `wp_users` , `wp_xspf_player` , `wp_xspf_player_categories` , `wp_xspf_player_tracks_categories` ;

After running your query you have the choice to make this command a bookmark for easier access to it later. I think it’s a good idea to keep the query as I know I’ll likely have to run it a few more times before it cools off again.
Another issue with these broken tables is snort will not be able to log to it’s database too. It will try and report this to your syslog if running. Your errors may vary, but generally I’ve noticed anytime snort compains about database, then it just wants some love.

Aug 11 05:25:07 mywhiz snort[11349]: database: mysql_error: MySQL server has gone away SQL=INSERT INTO reference_system (ref_system_name) VALUES ('cve')
Aug 11 05:25:07 mywhiz snort[11349]: database: mysql_error: MySQL server has gone away
Aug 11 05:25:07 mywhiz snort[11349]: database: Unable to insert unknown reference tag ('2002-0012') used in rule.

Again going to phpmyadmin and selecting all of snorts tables and choosing the repair operation saves things.

REPAIR TABLE `acid_ag` , `acid_ag_alert` , `acid_event` , `acid_ip_cache` , `base_roles` , `base_users` , `data` , `detail` , `encoding` , `event` , `icmphdr` , `iphdr` , `opt` , `reference` , `reference_system` , `schema` , `sensor` , `signature` , `sig_class` , `sig_reference` , `tcphdr` , `udphdr`;

[tags]demons, mysql_databases, pain_in_the_ass, phpmyadmin, repair_tables, snort, software, sql_query, summer_heat, wordpress[/tags]

Aggregator Showdown.

I started writing this last week, but with a lack of energy, here’s the skinny on what I’ve written up.

Dave Winer reminds us the other day. “2/3/06: “Aggregator developers could sure use some competition!
I like server side aggregators more than desktop. In a multi-user aggregator ideally it should be customizable by the end-user. One that shows you your feeds how you like to view them, whether it be email style, linear, reverse, upside down, reverse print, etc.
It should also remembers what’s new since the last visit.
I decided I’d see just what the opensource world has to offer in web-based single and multi-user aggregators.
I really wasn’t too impressed from a selection point of view with a multi-user installation in mind.
most opensource aggregators aren’t “pretty” or even still in development.
2004 was last real opensource aggregator development time period.
I even tried to get some of the ones listed in google’s directory to work.
here is some of my results in demo form.

DATE NAME Code Users? In Devel? OPML? Working?
2004.02.14 rnews php single no yes yes - with manual fix
2004.11.06 TALAggregator python single no yes no
2004.08.08 planet python single no no not latest dev version
2004.12.16 feedonfeed php single no import yes

Installation notes.
I first tried the Gentoo ebuild version of planet which is quite old but worked. planet has a nightly snapshot of their devel repo, which is missing a python dependancy I can’t figure out.

TALAggregator lacks a logout button, which makes it difficult to create users, and use your own account to browse feeds. Also logging in doesn’t usually work properly. TALAggregator stores it’s password in an encrypted format in the mysql database.

rnews stores the passwords as plaintext in the mysql database and also lacks a logout button/link. It is also having issues when creating it’s tables in the database. Being able to create the user_prefs table, but not the links, and users’ links table. ex. “links”, “px_links”

Once I applied some force and a crowbar, I now have the sql to create the needed table. It’s support with importing of opml files works fine and also adds your categorized material correctly. And of course the interface is a tad bit clunky.

CREATE TABLE `links` (
`id` INT( 16 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`src_id` VARCHAR( 36 ) NOT NULL ,
`link` TEXT NOT NULL ,
`title` TEXT NOT NULL ,
`description` TEXT NOT NULL ,
`state` VARCHAR( 16 ) NOT NULL ,
`pubdate` DATETIME NOT NULL ,
UNIQUE (
`src_id` ,
title( 255 )
)
) ENGINE = MYISAM
CREATE TABLE `px_links` (
`id` INT( 16 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`name` TEXT NOT NULL ,
`main_link` TEXT NOT NULL ,
`rss_link` TEXT NOT NULL ,
`image_url` TEXT NOT NULL ,
`user_order` INT( 8 ) NOT NULL ,
`category` TEXT NOT NULL ,
`last_update` DATETIME NOT NULL
) ENGINE = MYISAM ;

Bad Behavior has blocked 773 access attempts in the last 7 days.

>>>>>>> .r246