Tech Blog

bogus data in log event

March 30th, 2013

Weird while trying to repair replication this error occured

130330 9:07:48 [Note] Slave I/O thread: connected to master ‘repl@172.30.0.25:3306′,replication started in log ‘mysql-bin.000892′ at position 87928597
130330 9:07:49 [ERROR] Error reading packet from server: bogus data in log event; the first event ‘mysql-bin.000892′ at 87928597, the last event read from ‘./mysql-bin.000892′ at 87928597, the last byte read from ‘./mysql-bin.000892′ at 87928616. ( server_errno=1236)
130330 9:07:49 [ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: ‘bogus data in log event; the first event ‘mysql-bin.000892′ at 87928597, the last event read from ‘./mysql-bin.000892′ at 87928597, the last byte read from ‘./mysql-bin.000892′ at 87928616.’, Error_code: 1236
130330 9:07:49 [Note] Slave I/O thread exiting, read up to log ‘mysql-bin.000892′, position 87928597

Doing this
mysqlbinlog mysql-bin.000892 > /tmp/e

Revealed that position 87928597 did not exist, so I restarted replication from a nearby position.

If you dont care about collations in your database, then read this and understand: MySQL’s character sets and collations demystified | code.openark.org.

Utf8 is great, but takes space. Also note the _ci extention to most collations. That is what controls the case insensitivenes in mysql. But often you use varchar’s as keys and searches, that will never ever need case insensitivenes. I wonder how much performance is lost there.

Thunderbird/Change account order

February 21st, 2013

It is a bit tricky to change the order of accounts in thunderbird, but it works with some experiments.

Thunderbird/Change account order – Sidvind.

Charging dead NiMH batteries

November 28th, 2012

I have a fancy battery charger. But often it cannot charge my batteries, the indicator just starts to blink, so I have to charge them manually some how. I recently discoverd that all I need to do is to take a fully charged battery, connect “+” to “+” and “-” to “-” for about 30 seconds. Then the battery gets charged a bit, and the fancy charger can do the rest.

I recently moved to IMAP on gmail, to be able to read my mail from my work computer. Thus IMAP was ideal.

The migration of old folders was relatively easy, just create a new account on my existing thunderbird, and drag the folder. It is possible to draq a whole substructure, but it may stop for some reason. So doing it one by one may be safer.

Also note that on gmail, there may be less messages in the folder. The examples I found on this was that thunderbird allowed the same message to appear twice in a folder. Most likely gmail looks at the message id. Using pop, it can sometimes happen, that the same message is fetched twice, ex. when changing something in the account settings, it will download the last months email once more.

I also lost my precious message rules. However, the message rules can be found in clear text in a file called .thunderbird/profilename.default/ImapMail/imap.gmail.com/msgFilterRules.dat

Simply copy that file from your previous account. You will need to modify “actionValue” for each rule, but that can either be done by the gui or search & replace in the text file.

You can by using the text editor of course also merge rules. A rule may consist of these six fields:
name=”"
enabled=”yes”
type=”17″
action=”Move to folder”
actionValue=”"
condition=”"

MySQL :: MySQL 5.0 Reference Manual :: C.5.5.8 Problems with Floating-Point Values.

I ran into this today. Tried to compare a sum and did a round. Now I know this for next time!

Need access to Fedora 15 desktop remotely to support friends. I found this guide:

yum install x11vnc
/usr/bin/vncpasswd
x11vnc -rfbauth ~/.vnc/passwd -display :0

Whe using SSH in a development environment these two settings in ~/.ssh/config are almost mandatory

# always get your X server with you
ForwardX11=yes

#Skip authenticity question with SSH
StrictHostKeyChecking=no

Note that you will get this message first time you log into a host:
Warning: Permanently added ‘media,87.62.241.54′ (RSA) to the list of known hosts.

Fedora automatic login

December 5th, 2010

There are tools, but they are not always installed, so it is faster to find the configuration file:
/etc/gdm/custom.conf
[daemon]
TimedLoginEnable=true
TimedLoginDelay=5
TimedLogin=media

Filtering spam with Postfix

August 25th, 2010

Good article on spam filering in Postfix. I like the greylist, and will implement that.

The most important thing I learned from the process was that it’s easy to experiment with Postfix, and it can be customized to your level of comfort. When used in my configuration, the most effective filters are:

* Greylisting

* DNS blackhole lists

* HELO enforcement

via Filtering spam with Postfix.

Meta

Proudly powered by WordPress. Theme developed with WordPress Theme Generator.
Creative Commons License