Wednesday, May 14, 2008

Calibrate the notebook PC battery

Short discharges and recharges do not fully synchronize the battery's fuel gauge with the battery's state-of-charge. This can result in the amount of power available in one cycle being less than expected or the battery meter being inaccurate.Under normal usage, batteries should be calibrated a minimum of once every 3 months. Your battery can be calibrated by following these steps:Step 1 - Disable the Windows Power Management In Windows, right-click the Desktop and select Properties in the menu list. Click the Screen Saver tab and then click the Power button. Under Power schemes, select Always On in the drop down menu. Under Settings for Always On power scheme, select Never in each of the drop down menus. Click OK on the Power Options Properties window and then click OK on the Display Properties...

Monday, May 12, 2008

Solution to MySQL Replication Problems: Master DB crashed

It is commons that replication will hang after master database crashed. And the error message you will get when you show slave status is:Client requested master to start replication from impossible position (server_errno=1236)This happened because MySQL write to bin-log in batch basis. If every bit of your data is mission critical and any inconsistent between master and salve is not accectable, then you should redo you replication all over again.So far I do not found any way to prevent this replication failure. However, you may add the follwing line into you my.cnf to reduce the chances it happen:sync_binlog=1This means that MySQL will write to bin-log after each update instead of write in batch. As you may expect, this will reduce the performance of the database.Else, there is another way...